int main() { char ch; printf("Enter a character: "); ch = getchar(); if(ch == 'G') { printf("You have entered character G"); } else { printf("Please enter character G"); } return 0; }