2 3
5
C语言版:
#include<stdio.h> int main() { int a,b; scanf("%d%d",&a,&b); printf("%d\n",a+b); }
Java jdk 1.4 版
import java.io.*; import java.util.*; public class Main { public static void main (String args[]) throws Exception { BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); String line = stdin.readLine(); StringTokenizer st = new StringTokenizer(line); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); System.out.println(a+b); } }
C++版:
#include <iostream> #include <algorithm> using namespace std; int main() { int a, b; cin >>a >>b; cout <<a+b <<endl; return 0; }
原文:https://www.cnblogs.com/GetcharZp/p/8920396.html