/* Sentence.c (c) Kari Laitinen http://www.naturalprogramming.com/ 2013-11-20 File created. 2013-11-20 Last modification. */ #include int main() { printf( "\n Type in L, M, or S, depending on whether you want" "\n a long, medium, or short sentence displayed: " ) ; char character_from_keyboard = getchar() ; character_from_keyboard = character_from_keyboard & 0xDF ; printf( "\n This is a" ) ; switch ( character_from_keyboard ) { case 'L': printf( " string of characters in a \n" ) ; case 'M': printf( " switch statement in a" ) ; case 'S': printf( " program that teaches C programming." ) ; default: printf( "\n This is a somewhat weird program.\n" ) ; } }