Question: Exercise 1 : Array Twisters ( lab 1 _ ex 1 . c ) Create a Program that asks for 1 0 integers ( Use

Exercise 1: Array Twisters (lab1_ex1.c)
Create a Program that asks for 10 integers (Use Arrays). Afterward, display a navigation menu and perform the following:
Display the numbers
Display it in reverse order
Display the values of even indices (0th,2nd,4th,6th,8th,...,2n)
Display the values of odd indices (1st,3rd,5th,7th,9th,..,2n+1)
Ask for an index k, then rotate array to the right.
Ask for an index k, then rotate the array to the left.
Sample Input Expected Output
10451526352571283
1
number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
choice: 1
10451526352571283
10451526352571283
2 number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
choice: 2
38127253526154510
10451526352571283
3 number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
choice: 3
10153578
10451526352571283
4 number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
choice: 4
452625123
10451526352571283
5
2 number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
offset: 2
83104515263525712
10451526352571283
6
2 number: 10451526352571283
Menu:
1. Display the numbers
2. Display it in reverse order
3. Display values of even indices
4. Display values of odd indices
5. Rotate array by k (Forward)
6. Rotate array by k (Backward)
offset: 2
15263525712831045

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!