为了技术分,版主别删!
#include <stdio.h>
int main()
{ //输入一个月份
int month = 0;
printf("请输入一个月份:");
scanf("%d",&month);
switch(month)
{
case 1:
case 2:
case 3:
printf("春季\n");
break;
case 4:
case 5:
case 6:
printf("夏季\n");
case 7:
case 8:
case 9:
printf("秋季\n");
case 10:
case 11:
case 12:
printf("冬季\n");
default:
printf("你是火星来的么!");
}
printf("over!");
return(0);
}
*/
/*
#include <stdio.h>
int main()
{
//输入月份
int month = 0;
int year = 0;
printf("请输入一个年月份:");
scanf("%d%d",&year,&month);
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
printf("这个月有31天!\n");
break;
case 4:
case 6:
case 9:
case 11:
printf("这个月有30天!\n");
break;
case 2:
{
if(year % 400 ==0||(year % 4 ==0 && year % 100 != 0))
{
printf("这个月有29天!\n");
}
else
printf("这个月有28天!\n");
break;
}
default:
printf("你是火星来的么!\n");
}
}
*/
/*
#include <stdio.h>
int main()
{
int a = 0;
while(a < 10)
{
printf("欢迎你来到传智播客学习!%d\n",a);
a++;
}
return 0;
}
|
|