hdu1000

//c
#include"stdio.h"
int main()
{
int i, j;
while(scanf("%d%d", &i, &j) == 2)
printf("%d\n", i + j);
return 0;
}

//c++

#include 
using namespace std;
int main() {
int a, b;
while(cin >> a >> b) {
cout << a + b << endl;
}
return 0;
}

//C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csharp
{
class Program
{
static void Main(string[] args)
{
string s;
int a, b;
while ((s = Console.ReadLine())!=null)
{
string[] str = s.Split(' ');
a = Convert.ToInt32(str[0]);
b = Convert.ToInt32(str[1]);
Console.WriteLine("{0}", a + b);
}
}
}
}

//java
import java.util.Scanner;

public class Main {

public static void main(String args[]){
    int a,b;
    Scanner s=new Scanner(System.in);
    while(s.hasNextInt()){
        a=s.nextInt();
        b=s.nextInt();
        System.out.println((a+b));
    }
}

}

posted @ 2017-01-10 13:07  王坤1993  阅读(184)  评论(0)    收藏  举报