Question: Help we solve task 1 and 2 please Problem 1 Use switch-case statements for this program. Write a menu-driven c program which has the following

Help we solve task 1 and 2 please

Help we solve task 1 and 2 please Problem 1 Use switch-case

Problem 1 Use switch-case statements for this program. Write a menu-driven c program which has the following options: Factorial ofa number Prime or not Odd or even Exit PP'P!' Once a menu item is selected the appropriate action should be taken and once this action is finished, the menu should reappear. Unless the user selects the 'Exit' option the program should continue to run. Problem 2 Left-right shift array elements: Write a program that performs the following tasks: a. Define a symbolic constant N that can be any positive integer. b. The program takes N integers as input from the user from the command line and stores them in an integer array called inputArray. Print out all elements of inputArray on a single line. d. Program asks user to input one of the following characters as input. Program keeps asking for input until 'X' or 'x' is input by the user: - 'L' or 'l': Left-shift the elements of inputArray. For example, if inputArray contains {1, 2, 3, 4}, after performing a left-shift its contents will be {2, 3, 4, 1}. Print out the new contents of the array on a single line. - 'R' or 'r': Right-shift the elements of inputArray. For example, if inputArray contains {1, 2, 3, 4}, after performing a right-shit its contents will be {4, 1, 2, 3}. Print out the new contents of the array on a single line. - 'X' or 'x': Print out the new contents of the array on a single line. Then, exit the program. - For any other input, do nothing and ask for another input character again. 9 Submission Instructions Upload an MS Word document file (.DOCX) that contains the following: 1. Source code (.CPP file) of your program. 2. Also include a screenshot of the console window output of your program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!