I would support the suggestion to acquire the required programming knowledge with a book or a tutorial. On the other hand, you also learn a lot by finding and fixing your own mistakes. The compiler can give good hints. Sometimes you have to ask him for it by specifying compiler options. Unfortunately you forgot to specify which compiler or programming environment you use. Also the operating system can play a role, if you want to access system functions.
If you want, you can easily write a function get_char() if you want to have the above program like that. For example, the function you are looking for might look like this:
char get_char(char* txt)
{
printf("%s: ", txt);
int ch = getchar();
return ch;
}
It has already been pointed out that the program cannot be compiled as presented even then. Changes are needed in at least 5 other places. A proper C program needs e.g. at least a return at the end, in order to correspond to the standard. In addition, various brackets and semicolons are missing.