发布时间:2014-12-19 14:26:48
#include<stdio.h>int main(){int year;int yushu;scanf("%d",&year);yushu=year%400;if(yushu==0){printf("是闰年\n");return 0;}else{yushu=year%4;if(yushu!=0){printf("是平年\n");return 0;}else{yushu=year%100;if(yushu==0){printf("是平年\n");return 0;}else{printf("是闰年\n");r.........【阅读全文】
发布时间:2014-12-19 14:13:42
//2:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时// 共有5个数相加),几个数相加有键盘控制#include<stdio.h>int main(){int a, sum ,num;scanf("%d%d",&a, &num);switch (a){case 1:{sum=a;printf("%d\n",sum);break;}case 2:{sum=a+(a*10+a);printf("%d\n",.........【阅读全文】