I know, its simple to some of you guys, but please help, this is a forced course for engineering and I will never have to take it against after first year.
Write a user-defined function that computes the reduced sum of an integer. The
programmer should allow the user to input this integer. After outputting the
reduced sum, prompt the user to enter zero to exit or a non-zero integer to
continue. You must use the do-while loop.
Function prototype: int reducedSum(int value);
Example: Reduced sum of 124 is 1+2+4 = 7
This is the code I got so far for it, the error says:
''Error E@376 problem1.c 18: Do-while statement missing { in function main
*** 1 errors in compile ***
When I go to line 18, and add {, I get a lot more errors...help?
Write a user-defined function that computes the reduced sum of an integer. The
programmer should allow the user to input this integer. After outputting the
reduced sum, prompt the user to enter zero to exit or a non-zero integer to
continue. You must use the do-while loop.
Function prototype: int reducedSum(int value);
Example: Reduced sum of 124 is 1+2+4 = 7
This is the code I got so far for it, the error says:
''Error E@376 problem1.c 18: Do-while statement missing { in function main
*** 1 errors in compile ***
When I go to line 18, and add {, I get a lot more errors...help?