⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5_11.cpp

📁 C程序参考,简单易懂,是初学者不可少的参考资料
💻 CPP
字号:
#include<stdio.h>
main()
 {
     int year,month,days;
     printf("Please input year,month:");
     scanf("%d,%d",&year,&month);
     switch(month)
     {
         case 1:
         case 3:
         case 5:
         case 7:
         case 8:
         case 10:
         case 12:
             days=31;
             break;
         case 4:
         case 6:
         case 9:
         case 11:
             days=30;
             break;
         case 2:
             if(year%400==0||year%4==0&&year%100!=0)
                 days=29;
             else
                 days=28;
             break;
     }
     printf("The number of days of %d,%d is %d.\n",month,year,days);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -