1483: switch应用举例:输入某年的某一个月份,显示该月有多少天

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:8765 Solved:5732

Description

switch应用举例:输入某年的某一个月份,显示该月有多少天?

运行案列:

请输入年份和月份:2008 8
2008年8月有31天 

Input

输入年份和月份

 printf("请输入年份和月份:");
 scanf("%d%d", &year, &month);

 

Output

输入某年某月有多少天

 printf("%d年%d月有%d天\n", year, month, day);

 

Sample Input Copy

2008 8

Sample Output Copy

请输入年份和月份:2008年8月有31天