ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1180. Stone Game

Show all messages Hide all messages

Why Compilation error? Please, have a look at my source!!! Vladimir Milenov Vasilev 7 Mar 2002 01:54
Here is my source!

#include <stdio.h>
#include <io.h>
int main(){
char ch;
int sumall=0;
while (!feof(stdin)) {scanf("%c",&ch); if (feof(stdin))
break;sumall+=ch-48;}
//printf("s=%d",sumall);
printf("%d\n",(sumall%3==0)+1);
if (sumall%3) printf("%d",sumall%3);
return 0;
}

Thanks!!!!
don't #include <io.h> MadPsyentist/Sam 7 Mar 2002 03:35
> Here is my source!
>
> #include <stdio.h>
> #include <io.h>
> int main(){
> char ch;
> int sumall=0;
> while (!feof(stdin)) {scanf("%c",&ch); if (feof(stdin))
> break;sumall+=ch-48;}
> //printf("s=%d",sumall);
> printf("%d\n",(sumall%3==0)+1);
> if (sumall%3) printf("%d",sumall%3);
> return 0;
> }
>
> Thanks!!!!