자바 초보적인 질문 ㅜㅜ for문
그림자
2023.04.01
public class practice2 {
public static void main(String[] args){
for(int a=10; a=1; a--){
System.out.print(a);
}
for(int b=0; b1; b++)
System.out.println();
for(int c=9; c=1; c--){
System.out.print(c);
}
}
}
이렇게 하면
10987654321
987654321
출력되는데여
저렇게 포문 많이안쓰고 2중포문으로 간단하게
숫자 하나씩 줄이면서 1까지 출력하려고 하는데
방법이 있나요 ㅜ?