c语音好玩代码,有没有20行以内却很有意思的C语言代码

1,有没有20行以内却很有意思的C语言代码楼上这个关机的略6#include int main(void) { system("shutdown -s -t 0"); return 0; }
2,求C语言基础代码C菜鸟助手成员tonytvb为你解答(如有疑问请hi我或向我的团队提问):#includeint main()int year,month;scanf("%d %d",&year,&month);if(month>12||monthprintf("year:%d,month:%d\n",year,month);if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)printf("31 days\n");elseif(month==4||month==6||month==9||month==11)printf("30 days\n");elseif((month==2&&year%400==0)||(month==2&&year%4==0&&year%100!=0))printf("29 days\n");else printf("28 days\n");return 0;}#include #include int isLeepYear(int year) return (year%4==0&&year%100!=0||year%400==0);}int getDaysOfMonth(int year,int month) int nDays[13]= if(year12) return 0; nDay=nDays[month]; if(isLeepYear(year)&&month==2) nDay++; return nDay;}int main() int year,month; printf("请输入年份和月份:\n"); scanf("%d %d",&year,&month); printf("%d年%d月有%d天\n",year,month,getDaysOfMonth(year,month)); system("pause"); return 0;}【c语音好玩代码,有没有20行以内却很有意思的C语言代码】

    推荐阅读