Created
July 13, 2018 02:18
-
-
Save wakhoo/64057fd7b629ac91790c855c9c8a38bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class step1_print { | |
public static void main(String[] args){ | |
System.out.println(" 일 월 화 수 목 금 토"); | |
System.out.println("--------------------------"); | |
System.out.println(" 1 2 3 4 5 6 7"); | |
System.out.println(" 8 9 10 11 12 13 14"); | |
System.out.println(" 15 16 17 18 19 20 21"); | |
System.out.println(" 22 23 24 25 26 27 28"); | |
System.out.println(" 29 30 31"); | |
Scanner sc=new Scanner(System.in); | |
System.out.println("더하고 싶은 숫자 두개를 입력하시오:"); | |
int num1=sc.nextInt(); | |
int num2=sc.nextInt(); | |
System.out.println(num1+"+"+num2+"="+(num1+num2)); | |
int[] dayOfmonth={31,28,31,28,31,28,31,31,28,31,28,31};//=new int[12]; | |
System.out.println("몇일까지 있는지 알고싶은 달을 입력하시오"); | |
int month=sc.nextInt(); | |
System.out.println(dayOfmonth[month-1]+"일까지 있습니다."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment