2019年5月23日

4.2

摘要: #include "stdafx.h"#include "stdio.h"int main(int argc, char* argv[]){ int a[3][3]; int i,j; for (i=0;i<3;i++) for (j=0;j<3;j++) scanf("%d",&a[i][j]); 阅读全文

posted @ 2019-05-23 15:58 an同学 阅读(177) 评论(0) 推荐(0)

4.1

摘要: #include "stdafx.h" #include "stdio.h" int main(int argc, char* argv[]) { int a[10]; int i,j,t; for(i=0;i<10;i++) scanf("%d",&a[i]); printf("\n"); for 阅读全文

posted @ 2019-05-23 14:53 an同学 阅读(199) 评论(0) 推荐(0)

2019年5月9日

3.2

摘要: #include "stdafx.h" int main(int argc, char* argv[]) {int h,t,a,n; int i=0; for(n=100;n<1000;n++) {h=n/100; t=(n-h*100)/10; a=n%10; if(n==h*h*h+t*t*t+ 阅读全文

posted @ 2019-05-09 15:52 an同学 阅读(324) 评论(0) 推荐(0)

3.1

摘要: (1) # include <stdio.h> int main() {int s=0; int a; for(a=22;a<=1002;a+=20) {s=s+a; } printf("%ld\n",s); return 0; } (2) #include "stdafx.h" int main( 阅读全文

posted @ 2019-05-09 15:50 an同学 阅读(307) 评论(0) 推荐(0)

2019年4月25日

2.4

摘要: # include <stdio.h>int main(){ int a,b,profit;double rate,tax;printf("input a's number:");scanf("%d",&a);if(a>=5000)rate=0.15;else b=a/500;switch(b) { 阅读全文

posted @ 2019-04-25 16:12 an同学 阅读(508) 评论(0) 推荐(0)

2.3

摘要: # include <stdio.h>int main(){ printf("请输入三个数字\n"); float a,b,c; scanf("%f%f%f",&a,&b,&c); if(a+b<=c||a+c<=b||b+c<=a) printf("a,b,c不能构成三角形"); else if( 阅读全文

posted @ 2019-04-25 16:04 an同学 阅读(406) 评论(0) 推荐(0)

2.2

摘要: # include <stdio.h>int main(){ int year,month=2,days;printf("input the year:");scanf("%d",&year);if(((year%100!=0)&&(year%4==0))||((year%100==0)&&(yea 阅读全文

posted @ 2019-04-25 14:41 an同学 阅读(467) 评论(0) 推荐(0)

2.1

摘要: # include <stdio.h>int main(){ int a,b,c,d,e;a=getchar();b=getchar();c=getchar();d=getchar();e=getchar();putchar(a);putchar(b);putchar(c);putchar(d);p 阅读全文

posted @ 2019-04-25 14:27 an同学 阅读(241) 评论(0) 推荐(0)

2019年4月11日

实验一(3)

摘要: #include "stdio.h" #include "math.h" int main(int argc, char* argv[]) { float x,y; scanf("%f%f",&x,&y); printf("z=%d\n",(int)(x+1/fabs(y))); printf("z 阅读全文

posted @ 2019-04-11 15:53 an同学 阅读(138) 评论(0) 推荐(0)

实验一(2)

摘要: #include <stdio.h> int main(){ char c1,c2; c1=97,c2=98; printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2); return 0; } 阅读全文

posted @ 2019-04-11 15:11 an同学 阅读(94) 评论(0) 推荐(0)

导航