day16 - 교육내용 복습

in kr-dev 커뮤니티3 years ago (edited)

지난번에 이상하게 짰던 while 반복구문을 더 간단하게 다시 짜봤습니다.

int cnt=9, loop=0, num=1;
while(loop<9) {

        int str =0;
        while(str++<=cnt) {
            
            System.out.print("*");
            if(str==cnt) {
                System.out.print(num++);
                break;
            } //end of if
        }//end of while
            
        
    System.out.print("\n");
    loop++; cnt--;
        
    }//end of while

int i = 1;
while(i<10) {
int j= 10;
while(j>i) {
System.out.print("*");
j--;
}
System.out.println(i);
i++;

    }



Posted through the AVLE Dapp (https://avle.io)

Sort:  
 3 years ago 

[광고] STEEM 개발자 커뮤니티에 참여 하시면, 다양한 혜택을 받을 수 있습니다.

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)

The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.

Upvoted! Thank you for supporting witness @jswit.

멋진 날 되세요~~^^

!shop

Hi~ bigbear34!
@garamee21 has gifted you 1 SHOP!

Currently you have: 27 SHOP

View or Exchange SHOP Please go to steem-engine.net.

Are you bored? Play Rock,Paper,Scissors game with me!

형 로하는 건강하지? 말이 없더라도 형이 톡방에 없으니 방이 빈 것 같아 형이 올 날을 기다릴게! 항상 건강하구!


안녕하세요.
이 글은 SteemitKorea팀(@maikuraki)님께서 저자이신 @bigbear34님을 응원하는 글입니다.
소정의 보팅을 해드렸습니다 ^^ 항상 좋은글 부탁드립니다
SteemitKorea팀에서는 보다 즐거운 steemit 생활을 위해 노력하고 있습니다.
이 글은 다음날 다시 한번 포스팅을 통해 소개 될 예정입니다. 감사합니다!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.080
BTC 61291.61
ETH 1623.62
USDT 1.00
SBD 0.42