摘要: #include "stdio.h" #include "math.h" int prime(int n) { int i,j,k; k=(int)sqrt(double(n)); for(i=2;i<=k;i++) { if(n%i==0) { return 0; } ... 阅读全文
posted @ 2019-05-20 14:22 p_201821440046 阅读(162) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include "stdio.h" int aver1(int a,int b,int c) { int average1; average1=(a+b+c)/3; return average1; } int aver2(int a,int b,int c,int d,int e) { ... 阅读全文
posted @ 2019-05-06 16:02 p_201821440046 阅读(141) 评论(0) 推荐(0) 编辑
摘要: # include "stdafx.h" # include <stdio.h> int f(int n) { if(n==1||n==2) return n; else return n*f(n-1); } int main(int argc, char** argv) { int n,sum; 阅读全文
posted @ 2019-05-06 15:52 p_201821440046 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" int max2(int a,int b) { if(a>b) return a; else return b; } int max4(int a,int b,int c,int d) { int max2(int,int); int m; m=max2(a, 阅读全文
posted @ 2019-05-06 15:50 p_201821440046 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" int add(int a,int b) { int c; c=b+a; return c; } int minus(int a,int b) { int c; c=a-b; return c; } int multip(int a,int b) { int 阅读全文
posted @ 2019-05-06 15:48 p_201821440046 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include "stdio.h" int main(int argc, char* argv[]) { char a[81]; int i; int num=0,word=0; char c; gets(a); for(i=0;(c=a[i])!='\0' 阅读全文
posted @ 2019-05-06 15:05 p_201821440046 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" int main(int argc, char* argv[]) { int a[3][3]; int i,j,k; for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&a[i][j]); } } int sum 阅读全文
posted @ 2019-05-06 14:52 p_201821440046 阅读(170) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include "stdio.h" int main(int argc, char* argv[]) { int a[10]; int i,j,t; printf("input 10 numbers:\n"); for(i=0;i<10;i++) { sca 阅读全文
posted @ 2019-05-06 14:27 p_201821440046 阅读(239) 评论(0) 推荐(0) 编辑
摘要: #include<stdafx.h> int main() { int count=0; int i,j,k; for(i=1;i<=5;i++) { for(j=1;j<=5;j++) { if(i==j) continue; for(k=1;k<=5;k++) { if(i==j||i==k|| 阅读全文
posted @ 2019-04-22 16:03 p_201821440046 阅读(136) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" int main(int argc, char* argv[]) { int i,a,b,c; int count=0; for(i=100;i<1000;i++) { a=i/100; b=(i-a*100)/10; c=i%10; if(a*a*a+b*b 阅读全文
posted @ 2019-04-09 22:04 p_201821440046 阅读(152) 评论(0) 推荐(0) 编辑