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

what's wrong with this prigram ...
Posted by Desislav 28 Aug 2008 16:36
i don't understand why it doesn't work. Can somebody solve this problem

#include<stdio.h>

int main(void)
{
int a, b;

a = 5;
b = 1;
printf("The sum is: %d", (a + b));

return 0;
}
Re: what's wrong with this prigram ...
Posted by AlMag 28 Aug 2008 18:08
You should read a and b from console and print just sum without anything else. read rules
Re: what's wrong with this prigram ...
Posted by Meni Packeou 28 Aug 2008 22:05
#include <stdio.h>
main()
{
   int a, b;
   scanf("%d%d", &a, &b);
   printf("%d\n", a + b);
}
This is code correct and C