프로그래밍 문제/정올 (134) 썸네일형 리스트형 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 528 : 선택제어문 - 자가진단1 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); int num = sc.nextInt(); if (num 115 : 연산자 - 형성평가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); int height1 = sc.nextInt(); int weight1 = sc.nextInt(); int height2 = sc.nextInt(); int weight2 = sc.nextInt(); if ((height2 114 : 연산자 - 형성평가4 Java 1 2 3 4 5 6 7 8 9 10 11 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(); System.out.println(++num1 + " " + num2--); System.out.println(num1 + " " + num2); } } Colored by Color Scripter cs 113 : 연산자 - 형성평가3 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 width = sc.nextInt(); width += 5; int length = sc.nextInt(); length *= 2; System.out.println("width = " + width); System.out.println("length = " + length); System.out.println("area = " + (width*length)); } } Colored by Color Scri.. 112 : 연산자 - 형성평가2 Java 1234567891011import 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(); System.out.printf("%d / %d = %d...%d", num1, num2, num1/num2, num1%num2); }}Colored by Color Scriptercs 111 : 연산자 - 형성평가1 Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int kor = sc.nextInt(); int eng = sc.nextInt(); int math = sc.nextInt(); int comp = sc.nextInt(); int sum = kor + eng + math + comp; double avg = sum/4; System.out.printf("sum %d\n", sum); System.out.printf("avg %.0f\n", avg); .. 이전 1 ··· 4 5 6 7 8 9 10 ··· 12 다음