解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int n=scanner.nextInt();
int[][] a=new int[n][2];
int count1=0;
int count2=0;
for(int i=0;i<n;i++){
a[i][0]=scanner.nextInt();
a[i][1]=scanner.nextInt();
count1+=a[i][0];
count2+=a[i][1];
}
System.out.println(count1+"+"+count2+"i");
}
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.6 (C语言代码)浏览:624 |
幸运数 (C++代码)浏览:1256 |
循环入门练习5 (C语言代码)浏览:828 |
sizeof的大作用 (C语言代码)浏览:1021 |
C语言程序设计教程(第三版)课后习题10.7 (C语言代码)浏览:653 |
简单的a+b (C语言代码)浏览:414 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:509 |
简单的a+b (C语言代码)浏览:506 |
矩阵的对角线之和 (C语言代码)浏览:1336 |
数列排序 (C语言代码)浏览:606 |