/* YouLike.c (c) Kari Laitinen http://www.naturalprogramming.com/ 2013-11-20 File created. 2013-11-20 Last modification. */ #include int main() { printf( "\n Do you like the C programming language? " "\n Please, answer Y or N : " ) ; char character_from_keyboard = getchar() ; if ( ( character_from_keyboard == 'Y' ) || ( character_from_keyboard == 'y' ) ) { printf( "\n That's nice to hear. \n" ) ; } else if ( ( character_from_keyboard == 'N' ) || ( character_from_keyboard == 'n' ) ) { printf( "\n That is not so nice to hear. " "\n I hope you change your mind soon. \n " ) ; } else { printf( "\n I do not understand \"%c\".\n", character_from_keyboard ) ; } }