摘要: #include<stdio.h>int main(){ char string[99]; int i,word=0,num=0; gets(string); for(i=0;(string[i])!='\0';i++) if(string[i]==' ') word=0; else if(word 阅读全文
posted @ 2019-05-23 14:53 史智宇 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a[3][3]; int i,j,x=0; for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); for(i=0;i<3;i++) for(j=0;j<3;j++) if((i 阅读全文
posted @ 2019-05-23 14:32 史智宇 阅读(291) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ int i,j,t; int a[10]; for(i=0;i<10;i++) scanf("%d",&a[i]) ; for(j=0;j<9;j++) for(i=0;i<9-j;i++) if(a[i]>a[i+1]) { t=a[i] 阅读全文
posted @ 2019-05-23 14:21 史智宇 阅读(708) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int i,j,k,a,b=0; for(i=1;i<=5;i++) { for(j=1;j<=5;j++) { if(i==j) continue; for(k=1;k<=5;k++) { if((k==i)||(k==j)) contin 阅读全文
posted @ 2019-05-09 14:55 史智宇 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a,b,c=0,i,j,k; for(a=100;a<=999;a++) { i=a/100; j=(a/10)%10; k=a%10; b=i*i*i+j*j*j+k*k*k; if(a==b){ printf("%d\n",a); 阅读全文
posted @ 2019-05-09 14:35 史智宇 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a; long s=0; for(a=22;a<=1002;a=a+20) s=s+a; printf("%d\n",s); return 0;} #include<stdio.h>int main(){ int a=22; long 阅读全文
posted @ 2019-05-09 14:23 史智宇 阅读(154) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void main() { double a,rate,tax,profit; int b; printf("输入奖金数:"); scanf("%lf",&a); b=a/500; switch(b) { case 0:rate=0.00;break; case 阅读全文
posted @ 2019-04-25 16:15 史智宇 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h>int main(){ int a,b,c,t; scanf("%d,%d,%d",&a,&b,&c); if(a>b){ t=a; a=b; b=t; } if(a>c){ t=a; a=c; c=t; } if(b>c){ t=b 阅读全文
posted @ 2019-04-25 15:21 史智宇 阅读(169) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int year; printf("input the year\n"); scanf("%d",&year); if((year%4==0&&year%100!=0)||(year%400==0)){ printf("year:%d,mon 阅读全文
posted @ 2019-04-25 14:36 史智宇 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ char a,b,c,d,e; a=getchar(); b=getchar(); c=getchar(); d=getchar(); e=getchar(); putchar(a); putchar(b); putchar(c); put 阅读全文
posted @ 2019-04-25 14:13 史智宇 阅读(110) 评论(0) 推荐(0) 编辑