解题思路: 循环判断,格式输出
注意事项:
参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n=in.nextInt(),m=in.nextInt(),res=1; for(int i=1;i<=m;i++) { res=res*n; System.out.printf("%12d",res); if(i%5==0) System.out.println(); } in.close(); } }
0.0分
1 人评分
三角形 (C++代码)递推浏览:755 |
IP判断 (C语言代码)浏览:762 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:668 |
DNA (C语言描述,蓝桥杯)浏览:1553 |
A+B for Input-Output Practice (V) (C语言代码)浏览:459 |
C二级辅导-阶乘数列 (C语言代码)浏览:508 |
用筛法求之N内的素数。 (C语言代码)浏览:529 |
Tom数 (C语言代码)浏览:552 |
时间转换 (C语言代码)浏览:625 |
A+B for Input-Output Practice (I) (C语言代码)浏览:427 |