1 / 5
Oct 2009

Do not read this thread if you dont want to spoil this problem!
I have solved this and tried to alter the code from cout/cin to printf/scanf but when I do the later the code is rejected.

Here is the rejected code (C++!)

edited not to spoil

What am I doing wrong?

Try testing your code, eg on the sample input. The error should be obvious wink

edit not to spoil

I am too green to see the error blush

That shows the input mixed in with the output. If you redirect your input from a file or output to a file or otherwise so you can actually see what's going on, you'll see that your output for the sample input is:

1288

[quote="TripleM"]That shows the input mixed in with the output. If you redirect your input from a file or output to a file or otherwise so you can actually see what's going on, you'll see that your output for the sample input is:

1288

[/quote]
I just noticed it stuck_out_tongue I feel stupid now stuck_out_tongue
editing thread

Thanks for the help! This is what I dislike about coding stuck_out_tongue small things can really mess up everything stuck_out_tongue_winking_eye