Write small programs in C

Users questions: Each feature has a function to complete 2 programs running on the screen displays a menu, by selecting the menu, perform the corresponding function 3. When a function executed, can not exit the program, you need to return to the main menu, select the menu only exit, can exit the program. Output menu is as follows: use the function Can also be achieved in the main function 1 arithmetic 2 to determine the prime numbers 3 Enter the number of order N (N less than 10) 4 * Output diamond pattern with 5 out of as long as the main interface of the program, the first four of the small programs do not write
Experts answer:include stdio.h main () {Inta; for (a = 1; a! = 5; scanf ("% d", a)) {printf ("1. Arithmetic * n"); printf ("2. To determine the prime number * n"); printf ("3 Enter the number of order N (N is less than 10) * n") ; Printf ("4. Diamond-shaped pattern with the * output"); printf ("5. Exit"); switch (a! = 5) {case1 :.............; break; * * call the first program ** case2 :....... ........; Break; ** calls the second program ** case3 :.............; break; ** call a third program ** case4:. ............; break; ** ** program called the fourth }}}
  • This information provided by the users.Thanks!