Posted: Sat Mar 23, 2002 4:34 pm
Would you please help me on coding C++.
First, when I tried to write a program by C++, and submitted. What I received from the Judge is that: "wrong answer"
( I used: while(!cin.eof()) {....} to allow inputs from the judge)
However, when I just converted the program to C (by using #include <stdio.h> rather than #include <iostream>, and changed cin, cout to scanf, printf...), with the algorithms unchanged, the results received is "Accepted".
Could anyone help me out? Because I like to code in C++ more than in C.
Thanks very much in advance for your help
Sincerely
First, when I tried to write a program by C++, and submitted. What I received from the Judge is that: "wrong answer"
( I used: while(!cin.eof()) {....} to allow inputs from the judge)
However, when I just converted the program to C (by using #include <stdio.h> rather than #include <iostream>, and changed cin, cout to scanf, printf...), with the algorithms unchanged, the results received is "Accepted".
Could anyone help me out? Because I like to code in C++ more than in C.
Thanks very much in advance for your help
Sincerely