Question: C++ Write a C+ program that that reads 10 values from an input file data.txt and store them in an array. Your program asks the
Write a C+ program that that reads 10 values from an input file "data.txt" and store them in an array. Your program asks the user to enter a positive number 'n' and then shifts 'n' times the contents of array cells one cell to the right, with the last cell's contents moved to the left end. Your program should use at least one function void shift (int A [], integral s, integral n) Run your program with the following input data 76, 89, 100, 90, 90, 100, 76, 100, 90, 87. Your output should be as following: Before 76 89 100 90 90 100 76 100 90 87 Enter a positive number 2 After: 90 87 76 89 100 90 90 100 76 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
