분류 전체보기 (392) 썸네일형 리스트형 123 : 선택제어문 - 형성평가4 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Number? "); int name = sc.nextInt(); switch (name){ case 1: System.out.println("dog"); break; case 2: System.out.println("cat"); break; case 3: System.out.println("chick"); break; default:.. 122 : 선택제어문 - 형성평가3 Java 123456789101112131415import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int year = sc.nextInt(); if ((year%400) == 0) System.out.println("leap year"); else if (((year%4) == 0) && ((year%100) != 0)) System.out.println("leap year"); else System.out.println("common year"); }}Colored by Color Scriptercs 121 : 선택제어문 - 형성평가2 Java 123456789101112131415import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); if (num == 0) System.out.println("zero"); else if (0 120 : 선택제어문 - 형성평가1 Java 1 2 3 4 5 6 7 8 9 10 11 12 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num1 = sc.nextInt(); int num2 = sc.nextInt(); int result = (num1 632 : 선택제어문 - 자가진단9 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num1 = sc.nextInt(); int num2 = sc.nextInt(); int num3 = sc.nextInt(); int min = (num1 535 : 선택제어문 - 자가진단8 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double num = sc.nextDouble(); switch ((int)num) { case 4: System.out.println("scholarship"); break; case 3: System.out.println("next semester"); break; case 2: System.out.println("seasonal semester"); break; d.. 534 : 선택제어문 - 자가진단7 Java 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 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char grade = sc.next().charAt(0); switch (gerade) { case 'A': System.out.println("Excellent"); break; case 'B': System.out.println("Good"); break; case 'C': System.out.println("Usually"); break;.. 533 : 선택제어문 - 자가진단6 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char gender = sc.next().charAt(0); int age = sc.nextInt(); if (age 532 : 선택제어문 - 자가진단5 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double num1 = sc.nextDouble(); double num2 = sc.nextDouble(); if ((4 531 : 선택제어문 - 자가진단4 Java 12345678910111213141516171819import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double weight = sc.nextDouble(); if (weight 530 : 선택제어문 - 자가진단3 Java 1234567891011121314import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int age = sc.nextInt(); if (20 529 : 선택제어문 - 자가진단2 Java 12345678910111213141516import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int height = sc.nextInt(); int weight = sc.nextInt(); int fat = weight + 100 - height; System.out.println(fat); if (0 이전 1 ··· 14 15 16 17 18 19 20 ··· 33 다음