摘要: #include "stdio.h" #include "math.h" main() { int x; double y; scanf("%d",&x); y=sqrt(x); printf("%lf\n",y); } #include "stdio.h"int sum(int x,int y) //自定义函数 { retur... 阅读全文
posted @ 2017-05-20 19:41 该☆隐 阅读(204) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int a[10][10],i,j; for(i=0;i<10;i++) for(j=0;j<=i;j++) { if(j==0 || i==j) a[i][j]=1; else a[i][j]=a[i-1][j... 阅读全文
posted @ 2017-05-20 19:30 该☆隐 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { char ch[12]={'G','o','o','d',' ','m','o','r','n','i','n','g'}; int i; for(i=0;i='a')&&(a[i]<='z')) a[i]=a[i]-32; } printf("字符串转换后... 阅读全文
posted @ 2017-05-20 19:26 该☆隐 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int a[10],i,max,min; float ave=0; for(i=0;imax) max=a[i];//求最高分 if(a[i]a[j+1]) { t=a[j]; a[j... 阅读全文
posted @ 2017-05-20 19:13 该☆隐 阅读(304) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int i,j; for(i=1;i<=4;i++) { for(j=1;j<=i;j++) printf("*"); printf("\n"); } } 阅读全文
posted @ 2017-05-20 19:05 该☆隐 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int sum,i; sum=0; i=1; while(i<=100) { sum=sum+i; i++; } printf("sum=%d\n",sum); } #include "stdio.h" main() { ... 阅读全文
posted @ 2017-05-20 19:01 该☆隐 阅读(180) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int n; scanf("%d",&n); if(n%2=0) //if(n%2==0) printf("该数是偶数!\n"); else printf("该数是奇数!\n"); } #include "stdio.h" main(... 阅读全文
posted @ 2017-05-20 18:48 该☆隐 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" main() { int score; scanf("%d",&score); if(score>=60) printf("C语言成绩及格!\n"); } #include "stdio.h" main() { int a,b,t; scanf("%d%d",&a,&b)... 阅读全文
posted @ 2017-05-20 12:33 该☆隐 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-05-20 10:55 该☆隐 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-05-20 10:48 该☆隐 阅读(122) 评论(0) 推荐(0) 编辑