第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

這個(gè)怎么輸出

怎么寫出那個(gè)星號(hào)呈1,3,5,7的形式輸出出來(lái)呢

正在回答

3 回答

//輸出菱形
public class Test9 {
?? ?public static void main(String[] args) {
?? ??? ?for(int a=1;a<10;a++){
?? ??? ??? ?for(int j=0;j<9-a;j++){
?? ??? ??? ??? ?System.out.print(" ");
?? ??? ??? ?}
?? ??? ??? ?for(int i=0;i<2*a-1;i++){
?? ??? ??? ??? ?System.out.print("*");
?? ??? ??? ?}
?? ??? ??? ?System.out.println();
?? ??? ?}
?? ??? ?for(int a=1;a<9;a++){
?? ??? ??? ?for(int i=0;i<a;i++){
?? ??? ??? ??? ?System.out.print(" ");
?? ??? ??? ?}
?? ??? ??? ?for(int j=0;j<=2*8-2*a;j++){
?? ??? ??? ??? ?System.out.print("*");
?? ??? ??? ?}
?? ??? ??? ?System.out.println();
?? ??? ?}
?? ??? ?for(int a=6;a<13;a++){
?? ??? ??? ?for(int j=0;j<12-a;j++){
?? ??? ??? ??? ?System.out.print(" ");
?? ??? ??? ?}
?? ??? ??? ?for(int i=0;i<2*a-1;i++){
?? ??? ??? ??? ?System.out.print("*");
?? ??? ??? ?}
?? ??? ??? ?System.out.println();
?? ??? ?}
?? ?}

}

1 回復(fù) 有任何疑惑可以回復(fù)我~

//倒三角形
public class Test6 {
?? ?public static void main(String[] args) {
?? ??? ?for(int i=1;i<9;i++){
?? ??? ??? ?for(int j=0;j<i-1;j++){
?? ??? ??? ??? ?System.out.print(" ");
?? ??? ??? ?}
?? ??? ??? ?for(int k=0;k<(17-2*i);k++){
?? ??? ??? ??? ?System.out.print("*");
?? ??? ??? ?}
?? ??? ??? ?System.out.println();
?? ??? ?}

?? ?}
}

1 回復(fù) 有任何疑惑可以回復(fù)我~


http://img1.sycdn.imooc.com//5b2dda860001304307201280.jpg
public class HelloWorld {
public static void main(String[] args) {
System.out.println("打印直角三角形");
for (int i = 1;i<=4;i++) {
for (int s=4-i;s>0;s--) {System.out.print(" ");}
for (int j = 1;j<=i*2-1;j++) {
System.out.print("*");
}
System.out.println();
}
}
}

2 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

這個(gè)怎么輸出

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)