Start by creating a single C source file. You are going to write a program that lets the user input some integers, then outputs some statistics about them.
Your program needs to:
You may assume that the user always enters integers correctly (e.g., no floats or weird inputs). You should use dynamic memory to store the input numbers.
It might look something like this:
$ gcc -o nums nums.c
$ ./nums
How many integers? 5
> 1
> 3
> 42
> 7
> -1
You entered: 1,3,42,7,-1
Min: -1
Max: 42
Avg: 10.40
Sum: 52
You must submit your program file on the department server. As before,
use the handin
program, this time with assignment “proj2”. For
example:
handin comp235 proj2 nums.c
If you did not write the program on the department server, you will first need to transfer the file to the server. I can help with this, although the details depend on your operating system – come to office hours or email me.