Program 2 :
Write a C program menu.c that
will print the program menu. The program prompts the user
to enter
one integer number, this number will be used in the program to indicate
the specific menu choice. You should consider the following choices: input
0 - exit from the menu;
1 - program asks the user to enter a character and an integer, the program
print the right triangle of
the ASCII value of the character with the amount of rows
equals to the input number; 2 - program asks the user to
enter the
integer and checks if the input number is prime or not, 3 - program asks the user to
enter
one
character, one
integer, and one real number. The program prints the square that consists of amount of
rows that
equal to the input integer. On each row the prgram will print real number first, and
character next, and real
number again, and so on. The total amount of real numbers and characters will be equal
to the input
integer. If the input number is zero or negative, the program will prints the error
message.
Example:
If the menu choice is 1 and the input character is B and the input numbers is 5 the
program prints
66
66 66
66 66 66
66 66 66 66
66 66 66 66 66
If the menu choice is 3 and the input is
C, 5, 1.5
The program prints:
1.5 C 1.5 C 1.5
1.5 C 1.5 C 1.5
1.5 C 1.5 C 1.5
1.5 C 1.5 C 1.5
1.5 C 1.5 C 1.5
Compile the program and show me the result.