close


輸入指定數值,然後輸出指定圖形
至於是哪種圖形我懶得畫(茶)

底下是亂搞版?
--------------------------------------------------------------------
import java.io.*;

public class homework9458050_4{
public static void main(String[] alio)
throws IOException{

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("請輸入行數:");
int n = Integer.parseInt(br.readLine());
System.out.println();
for(int i = 1;i for(int j = 0;j System.out.print("老");
System.out.println();
}
if(n%2==0){
for(int i = n/2;i>0;i--){
for(int j = 0;j System.out.print("人");
System.out.println();
}
}
else{
for(int i = n/2+1;i>0;i--){
for(int j = 0;j System.out.print("人");
System.out.println();
}
}
}
}


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 steven70101 的頭像
    steven70101

    老人家的舊書房

    steven70101 發表在 痞客邦 留言(0) 人氣()