?? dig9_d.java
字號:
public class Dig9_d
{
final static int M=9;
static void count(int n,int k) //遞歸方法
{
int i;
if (n==1) //在1前留空
for (i=1;i<=M-k;i++)
System.out.print(" ");
System.out.print(" "+n);
if (n<k)
{
count(n+1,k);
System.out.print(" "+n);
}
}
public static void main(String args[])
{
int i;
for (i=1;i<=M;i++)
{
count(1,i);
System.out.println();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -