摘要: #include<stdio.h> int main(){ int a[3][3]={2,3,5, 45,23,65, 8,46,67}; int s,t; s=a[0][0]+a[2][2]+a[1][1]; t=a[0][2]+a[1][1]+a[2][0]; printf("%d\n%d\n" 阅读全文
posted @ 2019-05-06 14:27 p201821440019 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> void swap(int *a,int *b){ int t; t=*a; *a=*b; *b=t; } int main(){ int a[10]={12,3,54,34,6,7,465,678,45,99}; int i,t,j; for(j=0;j<10; 阅读全文
posted @ 2019-05-06 14:17 p201821440019 阅读(194) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a,b,c,s,t=0; for(a=1;a<6;a++){ for(b=1;b<6;b++){ for(c=1;c<6;c++){ s=100*a+10*b+c; if(a!=b&&b!=c&&a!=c){ printf("%d\n 阅读全文
posted @ 2019-05-06 14:02 p201821440019 阅读(244) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include "stdio.h" int main(){ int a,b,c,d,t,m; t=0; for(a=100;a<=998;a++){ b=a/100; c=a%100/10; d=a%10; if(a==b*b*b+c*c*c+d*d*d){ 阅读全文
posted @ 2019-04-22 15:43 p201821440019 阅读(260) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "stdio.h"int main(){long s,a;a=-2; for(s=2;s<=1002;s+=20){ a=a+s;}printf("%d",a);return 0;} 阅读全文
posted @ 2019-04-22 15:04 p201821440019 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "stdio.h"int main(){double a,rate,tax,profit;scanf("%lf",&a);if(a<500){ rate=0.00; tax=a*rate; profit=a-tax; printf("a=%lf 阅读全文
posted @ 2019-04-22 14:50 p201821440019 阅读(176) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "stdio.h"#include "math.h"int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a+b<=c){ printf("不能组成三角形");} else if(a+b>c&& 阅读全文
posted @ 2019-04-22 14:36 p201821440019 阅读(221) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include"stdio.h" int main(){ int year; printf("input the year:"); scanf("%d",&year); if(year%100 != 0&&year%4 == 0|| year%400 == 阅读全文
posted @ 2019-04-08 16:01 p201821440019 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include"stdio.h"int main(){ char a,b,c,d,e; a=getchar(); b=getchar(); c=getchar(); d=getchar(); e=getchar(); /*getchar("%d%d%d%d%d 阅读全文
posted @ 2019-04-08 15:43 p201821440019 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { int a,b,sum; a=123; b=456; sum=a+b; printf("sum is %d\n",sum); return 0; } #include "stdafx.h" #include"stdio.h" int ma 阅读全文
posted @ 2019-04-08 15:09 p201821440019 阅读(211) 评论(0) 推荐(0) 编辑