Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int arr[]=new int[n]; for(int a=0;a<n;a++) { arr[a]=sc.nextInt(); } for(int a=0;a<n;a++) { boolean it=(arr[a]%2!=0); if(a!=n-1) { System.out.println(it); System.out.println(); } else { System.out.println(it); } }
解题思路:
注意事项:
参考代码:
0.0分
0 人评分
A+B for Input-Output Practice (V) (C语言代码)浏览:442 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:494 |
上车人数 (C语言代码)浏览:1173 |
输出九九乘法表 (C语言代码)浏览:555 |
简单的a+b (C语言代码)浏览:720 |
字符串比较 (C语言代码)答案错误????浏览:596 |
C语言程序设计教程(第三版)课后习题6.2 (C语言代码)浏览:1419 |
校门外的树 (C语言代码)浏览:956 |
WU-整数平均值 (C++代码)浏览:1237 |
WU-拆分位数 (C++代码)浏览:779 |