this is the email I recieved from her:
the function should get its input from the parameter list, not directly from the user. For most functions, there shouldn’t be anything that deals with computer’s user interface such as keyboard or monitor. Please change this program and resend. Thanks.
Thank you for your help oh coded ones...
This was just explained to you in the other post. Take a look at this example:
int reverse(int num) {
int reverse = 0;
while (num > 0) {
reverse *= 10;
reverse += num % 10;
num /= 10;
}
return reverse;
}
Your method shouldn't prompt the user, but rather return the reverse of a number.
Hope this helps.
PS. I don't mind if you use that algorithm, but I'm sure your teacher will. Try to fix up your algorithm (they're pratically the same anyway).
Reputation Points: 32
Solved Threads: 10
Junior Poster in Training
Offline 94 posts
since Mar 2006