![]() |
please HELP
hi guys
i cant run the c++ and i have H.W yo submet i want someone to check if the answer is correct this is the question Write a C-Program that does the following • Read integer numbers from a file inp.dat • Calculate the sum, average, and multiplicand of even numbers and store the result and the even numbers in output file out1.dat • Calculate the sum, average, and multiplicand of odd numbers and stored the result and the odd numbers in output file out2.dat answer Code: C
|
Re: please HELP
As i see there are quite a few errors.
1. Input file name is not correct 2. Output file Path is not correct. 3. There is semicolon missing on even_product*=num; 4. num used without initilized. 5. for loop is an infinite loop. |
Re: please HELP
thanks shabbir
but what do u mean by 4 & 5 and how can i write input and output file name |
Re: please HELP
He meant is num variable used without being initialized. and probably he found the loop to be infinite.
|
| All times are GMT +5.5. The time now is 22:43. |