Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

leam.xybooks.com/zybook/UHCOSC1430ChenSpring2020/chapter/19/section/1 @ zyBooks My library > COSC 1430: Introduction to Programming home zy Books 19.1: Exercise 1 @ Leonel Avellaneda @zyBooks catalog Help/FAQ 19.1 Exercise

image text in transcribed
image text in transcribed
leam.xybooks.com/zybook/UHCOSC1430ChenSpring2020/chapter/19/section/1 @ zyBooks My library > COSC 1430: Introduction to Programming home zy Books 19.1: Exercise 1 @ Leonel Avellaneda @zyBooks catalog Help/FAQ 19.1 Exercise 1 Write a program that reads a comma-separated file (CSV) with integer values. Your program will take the file name as the input. If the file does not exist, then the program must print Error: input file not found! And, the program is terminated If the program opens the file successfully, the program will output the number of integers read from the file and store the numbers into an array. The program then accepts a user input integer to specify the number of shifts to the left that need to take place to the array. For example, given the following CSV file "input1.csv" 1,22,50,38,6 and a user input integer 2 for shifting, the output of your program must be 50 38 6 1 22 Implement a function, left shift with return type void, to achieve the above shifting. This function will take three parameters as input in the following order an integer array an integer specifying the size of the array an integer specifying the number of shifts Vetration canibatched > C CPU + l earn zybooks.com/zybook/UHCOSC1430ChenSpring2020/chapter/19/section/1 wake My library > COSC 1430: Introduction to Programming home > 19.1: Exercise 1 and a user input integer 2 for shifting, the output of your program must be: zyBooks catalog Help/FAQ Leonel Avella 50 38 6 1 22 Implement a function, left_shift() with return type void, to achieve the above shifting. This function will take three parameters as input in the following order: an integer array an integer specifying the size of the array an integer specifying the number of shifts Your left_shift() function will be tested separately via unit tests You can safely assume that the numbers of integers in the testing osv files are at most 100 NOTE if you hard code the output, you will receive zero for this exercise LAB ACTIVITY 0/20 U 19.1.1: Exercise 1 Downloadable files input1.csv Download main.cpp Load default template

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago