|
|
back to boardCommon BoardWhat version of C this Judge recognises? I'm new to this place. Could someone tell me why the following code got compile error? #include <stdio.h> #include <stdlib.h> int main(){ int a, b; scanf("%d %d", &a, &b); printf("%d\n", a+b); return 0; } Re: (+) > I'm new to this place. Could someone tell me > why the following code got compile error? > > #include <stdio.h> > #include <stdlib.h> > > int main(){ > int a, b; > scanf("%d %d", &a, &b); > printf("%d\n", a+b); > return 0; > } 1. may be you forgotten to put /* @JUDGE_ID: 11573XX 1000 C */ at the very first line ? (replace XX with your code) 2. your mailer automatically adds greetings and/or signature to all outgoing messages, so your message looks like this: ============================== Nice to see you, Online Judge! #include <stdio.h> int main() { ............. } --- Allen Lam, Senior Developer, Chicago, IL 26531 +1(703)287-2397 ============================== that generates errors. remove greetings, and add //@END_OF_SOURCE_CODE after the source code. it works! i have justentered this : ---------------------- #include <stdio.h> #include <stdlib.h>
int main(){ int a, b; scanf("%d %d", &a, &b); printf("%d\n", a+b); return 0; } ------------------------ in web form and got accepted! Ilya is right, if you use mail, be sure there are no extra data in your mail. |
|
|