Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i have to get the sum of input04.txt. when i run the code, then i got -1. but i need the sum of entering number(user
i have to get the sum of input04.txt.
when i run the code, then i got -1. but i need the sum of entering number(user input in terminal) which is 2,4,1,3 for this case.
how can i bring and use the input numbers to make sum()?
could you please fix the sum function that i can get correct sum result?
and please fix the driver() as well. thank you.
(runProgram.c has just driver() only in it)
void driver () \{ int anumber =1; promptList( ); while ( (anumber = getintegerLine ())>=0) \{ dk908970csci-vcf0: /1730b/04-Lab03\$./runProgram (az) : Entered >2 Running Average 2.00 Entered >4 Running Average 3.00 Entered 1 Running Average 2.33 Entered ---> 3 Running Average 2.50 End of input Summary Statistics: Sum: -1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started