본문 바로가기

**226

[BAEKJOON] No.2556 JAVA 별찍기 -14 그냥 사각형만드는문제였다...! import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i=0; i 2021. 10. 14.
[BAEKJOON] No.2522 JAVA 별 찍기 -12 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i=1; i0; j--) System.out.print(" "); for(int k=1; k0; i--) { for (int j=i; j0; k--) System.out.print("*"); System.out.println(); } sc.close(); } } 2021. 10. 14.
[BAEKJOON] No.2446 JAVA 별찍기 -9 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i=0; i0; m--) System.out.print("*"); System.out.println(); } for(int i=n-1; i>0; i--) { for(int j=i-1; j>0; j--)System.out.print(" "); for(int j=n-i+1; j>0; j--) System.out.print("*"); for(int m=n-i; m>0; m--) System.out.print("*"); Syst.. 2021. 10. 14.
[BAEKJOON] No.2445 JAVA 별찍기 -8 ​ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i=1; i0; k--) System.out.print("*"); for(int j=1; j0; k--) System.out.print("*"); System.out.println(); } sc.close(); } } 잘돌아가는데 왜 틀렸다하누,, import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s.. 2021. 10. 14.
[BAEKJOON] No.2444 JAVA 별찍기 -7 ​ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i=1; i0; j--) System.out.print(" "); for(int k=1; k 2021. 10. 14.
[BAEKJOON] No.2884 JAVA 알람시계 ​ ​ ​ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int M = sc.nextInt(); if(M=45) System.out.println(H+" "+(M-45)); sc.close(); } } 2021. 10. 14.