Note: No late projects will be accepted.
hw3.c
.
gcc -ansi -Wall hw3.c
Correct any compilation errors (if any) that you receive and recompile until you receive no errors.
a.out
is there. This is your executable program.
a.out
at the prompt. You can assume
the user will only input positive integers. Here is a
sample run of the program:
linux3[54]% ls hw3.c linux3[55]% gcc -ansi -Wall hw3.c linux3[56]% ls a.out hw3.c linux3[57]% a.out Please enter an integer: 7 Please enter another integer: 9 9 is larger than 7. The average of 7 and 9 is 8.000000. linux3[58]% a.out Please enter an integer: 9 Please enter another integer: 7 9 is larger than 7. The average of 9 and 7 is 8.000000. linux3[59]% a.out Please enter an integer: 7 Please enter another integer: 7 7 and 7 are equal. The average of 7 and 7 is 7.000000. linux3[60]% a.out Please enter an integer: 5 Please enter another integer: 9 9 is larger than 5. The average of 5 and 9 is 7.000000. linux3[61]% a.out Please enter an integer: 5 Please enter another integer: 8 8 is larger than 5. The average of 5 and 8 is 6.500000. linux3[62]%
hw3.c
.
To submit your project, type the following at the Unix prompt.
Note that the project name starts with uppercase
'H'.
submit cs104_0101 Hw3 hw3.c-OR-
submit cs104_0501 Hw3 hw3.cTo verify that your project was submitted, you can execute the following command at the Unix prompt. It will show the file that you submitted in a format similar to the Unix 'ls' command.
submitls cs104_0101 Hw3-OR-
submitls cs104_0501 Hw3