解题思路:
注意事项:
参考代码:import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=0;
int[] array = new int[100];
boolean tapm=true;
while(tapm){
int tapm1 = sc.nextInt();
int tapm2 = sc.nextInt();
if(tapm1+tapm2==0){
tapm=false;
}else{
array[t++] = tapm1+tapm2;
}
}
for (int i = 0; i < t; i++) {
System.out.println(array[i]);
}
}
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:1019 |
C语言程序设计教程(第三版)课后习题8.9 (C语言代码)浏览:570 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:744 |
【出圈】 (C语言代码)浏览:796 |
打水问题 (C语言代码)浏览:1072 |
C语言程序设计教程(第三版)课后习题6.10 (C语言代码)浏览:880 |
WU-判定字符位置 (C++代码)浏览:1406 |
C语言训练-自由落体问题 (C语言代码)浏览:615 |
文科生的悲哀 (C语言代码)浏览:1401 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:599 |