1
class DayShower
2

{
3
public static void main(String[] args)
4
{
5
int yearIn=2004;
6
int monthIn=2;
7
if(args.length>0)
8
{
9
monthIn=Integer.parseInt(args[0]);
10
}
11
if(args.length>1)
12
{
13
yearIn=Integer.parseInt(args[1]);
14
}
15
System.out.println(yearIn+"?ê"+monthIn+"??óD"+countDays(monthIn,yearIn)+"ìì");
16
}
17
static int countDays(int month,int year)
18
{
19
int count=-1;
20
switch(month)
21
{
22
case 1:
23
case 3:
24
case 5:
25
case 7:
26
case 8:
27
case 10:
28
case 12: count=21;break;
29
case 4:
30
case 6:
31
case 9:
32
case 11: count=30;break;
33
case 2:
34
if(year%4==0)
35
{
36
count=29;
37
}
38
else
39
{
40
count=28;
41
}
42
if((year%100==0)&(year%400!=0))
43
{
44
count=28;
45
}
46
}
47
return count;
48
}
49
}

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

29

30

31

32

33

34

35



36

37

38

39



40

41

42

43



44

45

46

47

48

49
