Name: ____________________________________________________ Alpha: _____________________
Describe help received: _________________________________________________________________
|
|
3 3Write below the output of the program, given the above input. Try it without compiling and running the code.
dataA.txt | sample run |
48 13 39 30 37 44 |
~/$ ./hw Enter a filename: dataA.txt [10,19]: * [20,29]: [30,39]: *** [40,49]: ** |
In the above output,
dataA.txt
contains
only one number between 10 and 19 (i.e., 13).
dataA.txt
contains
no number between 20 and 29.
dataA.txt
contains
three numbers between 30 and 39 (i.e., 39, 30, and 37).
dataA.txt
contains two
numbers between 40 and 49 (i.e., 48 and 44).
~/$ ./hw Enter a filename: dataB.txt [10,19]: ******** [20,29]: **** [30,39]: ******* [40,49]: * |
~/$ ./hw Enter a filename: dataC.txt [10,19]: ************************** [20,29]: ********** [30,39]: ************************* [40,49]: *************************************** |
while
-loop or
for
-loop.
~/bin/submit -c=IC210 -p=hw11 hw.cpp