day03_FlowEx2

육희영·2021년 9월 1일
0
package day03;

import java.util.Scanner;

public class FlowEx2 {

	public static void main(String[] args) {
		System.out.println("숫자를 하나 입력하세요.>");

		Scanner scanner = new Scanner(System.in);
		int input = scanner.nextInt();
		scanner.close();

		if (input == 0) {
			System.out.println("입력하신 숫자는 0입니다.");
		}
		if (input != 0) {
			System.out.println("입력하신 숫자는 0이 아닙니다.");
			System.out.printf("입력하신 숫자는 %d입니다.", input);
		}
	}

}

출력결과

0개의 댓글

관련 채용 정보