Notice
Recent Posts
Recent Comments
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Archives
Today
Total
관리 메뉴

충분히 쌓여가는

별찍기 본문

Java/JAVA1

별찍기

빌드이너프 2023. 5. 18. 15:51

**********

**********

**********

**********

**********

 

import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        System.out.println("**********");
        System.out.println("**********");
        System.out.println("**********");
        System.out.println("**********");
        System.out.println("**********");
    }
}

 

import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        for (int i=0; i<5; i++){
            System.out.println("**********");
        }
    }
}

 

import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        for (int i=0; i<5; i++){
            for (int j = 0; j < 10; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

*

**

***

****

*****

import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        for (int i=1; i<=5; i++){
            for (int j = 0; j < i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

'Java > JAVA1' 카테고리의 다른 글

while 문  (0) 2023.05.18
향상된 for 문  (0) 2023.05.18
중첩 for 문  (0) 2023.05.18
for 문  (0) 2023.05.18
임의의 정수 만들기 Math.random() 메서드  (0) 2023.05.17