A+B problem
2016-03-03 本文已影响0人
FTVBeginning
C:
include<stdio.h>
int main(){
int a,b;
scanf("%d %d", &a,&b);
printf("%d",a+b);
return 0;
}
Pascal:
var a,b: longint;
begin
readIn(a,b);
writeIn(a+b);
end.
C++:
include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
Java:
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner reader=new Scanner(System.in);
int a,b;
a=reader.nextInt();
b=reader.nextInt();
System.out.printIn(a+b);
}
}
Python:
import sys
for line in sys.stdin:
a=line.split()
print int(a[0])+int (a[1])