1 solutions
-
0
C :
#include <stdio.h> int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF) { printf("%d\n",a+b); } return 0; }
C++ :
#include <iostream> #include <cstdio> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("in.txt","r",stdin); #endif int a,b; while(cin >>a >>b) { cout <<a+b <<endl; } return 0; }
Pascal :
program abprob; var a,b:longint; begin readln(a,b); writeln(a+b); end.
Java :
import java.util.*; public class Main { public static void main(String args[]) { Scanner cin = new Scanner(System.in); int a,b; while(cin.hasNextInt()) { a = cin.nextInt(); b = cin.nextInt(); System.out.println(a+b); } } }
- 1
Information
- ID
- 9368
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 2
- Tags
- # Submissions
- 1
- Accepted
- 1
- Uploaded By