Question: cosc 1437 please try do all question please write in c ++ Assume that you will be given a *.txt file, which in the same

 cosc 1437 please try do all question please write in c

++ Assume that you will be given a *.txt file, which in

cosc 1437 please try do all question please write in c ++

Assume that you will be given a *.txt file, which in the same format of RandSource.tx (attached). The file has three numbers at each line. Numbers are separated with a space All number are in the range of [0,50]. The first two numbers indicate a range. The third one shows number of random numbers to be generated between first and second numbe The range always given in first second order. If not, raise an error. For example, 257 means that you need to generate 7 random numbers in the range of 2 - 5 (includin 2 and 5). You need to develop a complete C++ program to read each line from the .txt file and pr the result on screen in a formatted way. The output format will be first number>- : . For the above example, the output to screen should be 2 - 5: 6 5 4 6 3 7 5 You need to develop a complete C++ program to read each line from the .txt file and print the result on screen in a formatted way. The output format will be first number> : . For the above example, the output to screen should be 2 5: 6 5 4 6 3 7 5 The attached input file has, 3.68 2 19 10 4 124 160 7 43 083 10 9 8 Your program should generate this (or with different random numbers) output for this file 3 - 6: 543 56 345 2 - 19: 62 11 14 17 9 8 1927 4 - 12:54 10 9 1 - // no output here since quantity is 0 7 - 4: error 0 - 8:064 10 - 9: error Note that your program should any number of lines in the file. You strictly assume that all numbers are in the range of [0,50]

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 Databases Questions!