The case Control Structure Let us C solution
The case Control Structure | Let us C solution with details description and tutorials | yashwant kanetkar S.N Chapter S.N Chapter 1 Decision Control Structure 5 Arrays 2 The Loop Control Structure 6 Puppetting On Strings 3 The Case Control Structure 7 Structures 4 Function and Pointer 8 Input/Output in C [C] Write a menu driven program which has following options: 1. Factorial of a number. 2. Prime or not 3. Odd or even 4. Exit Make use of switch statement. The outline of this program is given below: /* A menu driven program */ main( ) { int choice ; while ( 1 ) { printf ( "\n1. Factorial" ) ; printf ( "\n2. Prime" ) ; printf ( "\n3. Odd/Even" ) ; printf ( "\n4. Exit" ) ; printf ( "\nYour choice? " ) ; scanf ( "%d", &choice ) ; switch ( choice ) { case 1 : /* logic for factorial of a number */ break ; case 2 : /* logic for deciding prime number */ break ; case 3 : /* logic for