Starting from:

$24.99

CS211 Assignment 0 Solution


Inputs
Your program should accept an input file as a command-line argument. A typical execution of your program will be ‘./a.out sample.graph’ (if your program is written in C). The input file name can be anything (don’t hard-code “sample.graph”).
The input file contains one integer per line.
Task and output
The output should be written to a file named ‘output.txt’ which should contain only 5 lines of data:
● The first line should contain the total numbers in given the file
● The second line should contain the minimum number present in the file
● The third line should contain the maximum number present in the file
● The fourth line should contain the sum of the numbers
● The fifth line should contain the average of numbers - up to two decimal points.
Submission and Evaluation
● The program you submit should output: “output.txt” when run.
(Usage of C is a mandatory for this assignment). Ex: 200010001.c
● Follow some coding style uniformly. Provide proper comments in your code.

More products