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 1000. A+B Problem

Doubts regarding problem no 1000 of volume 1
Posted by Yogesh 19 Jan 2007 21:51
My code seems to have compile error.What is wrong with my code.I am a beginner.please help.
#include<stdio.h>
void main()
{
int a=1,b=2,c;
printf("enter the value of a,b");
scanf("%d%d",&a,&b);
c=a+b;
printf("display the value of c");
scanf("%d",&c);
}
Re: Doubts regarding problem no 1000 of volume 1
Posted by Sid 19 Jan 2007 22:01
main() function must return 0. Don't use scanf at the end of problem or you will get time limit exceeded statement. You have to print out only what is expected by checker, just output a+b value.

Edited by author 19.01.2007 22:04
Read FAQ about solving problem A+B (-)
Posted by Vladimir Yakovlev (USU) 20 Jan 2007 00:20
Re: Doubts regarding problem no 1000 of volume 1
Posted by Yogesh 20 Jan 2007 22:12
thank you mate