输入年号和月份,输出这一年该月的天数。(提示:一个年份,先判断是否闰年) 相关知识点: 试题来源: 解析 main() {int year,month,days,a; scanf("%d,%d",&year,&month); if(year %400==0 || (year%4==0 && year%100!=0)) a=0; else a=1; swith(month) { c ase 1: c ase 3: c ase ...
include<iostream> using namespace std;int isLeap(int year){ if( year%400 == 0 || (year %4 == 0 && year %100 !=0)){ return 1;} else { return 0;} } int main(){ int year;int month;int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};cout<<"please input ...
include<stdio.h> void main(){ int temp=0,month,year;printf("Please input (year,month):");scanf("%d,%d",&year,&month);if((year%400==0)||(year%4==0&&year%100!=0))temp=1;{if(month==2){if(temp== 1)printf("%dyear%dmonth have 29 days\n",year,month);else prin...