用Java编写程序 任意两个输入两个整数 输出它们相加的结果

谢谢大家

第1个回答  推荐于2017-10-01
import java.util.*;
public class Test{
public static void main(String[] args){
int n = 0;
int m = 0;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
m = sc.nextInt();
System.out.println(n+m);
}
}本回答被提问者采纳
第2个回答  2010-03-09
public int plus(int a ,int b){
return a+b;
}
相似回答