IT82 Java (If else문 예제2_정수 값 3개 순서대로 출력) 정수 값 3개를 입력 받아 큰 수부터 순서대로 출력 package P0408; import java.util.Scanner; public class IfTemp2 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); int first, second, third, temp; System.out.print("첫번째 수: "); first = scan.nextInt(); System.out.print("두번째 수: "); second = scan.nextInt(); System.out.print("세번째 수: "); third = scan.nextInt().. 2021. 4. 8. Java (If else문 예제_정수 값 2개 순서대로 출력) 정수 값을 2개 입력 받아 크기 비교하는 예제 package P0408; import java.util.Scanner; public class IfTemp { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); int first, second, temp; System.out.print("첫 번째 수 입력하세요. "); first = scan.nextInt(); System.out.print("두 번째 수 입력하세요. "); second = scan.nextInt(); if (first 2021. 4. 8. 이전 1 ··· 18 19 20 21 다음