摘要: #include<stdio.h> main() { double m[8]; int i; for(i=0;i<=7;i++) scanf("%lf",&m[i]); for(i=7;i>=0;i--) printf("%f",m[i]); } #include<stdio.h> main() { 阅读全文
posted @ 2021-11-24 23:05 微笑|哈哈 阅读(40) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { int a=1,sum=0; while(a<=21){ if (a%2!=0){ printf("%d ",a); sum+=a; } a++; } printf("\n从1到21的奇数的总和为%d\n",sum); } #include<st 阅读全文
posted @ 2021-11-24 23:01 微笑|哈哈 阅读(16) 评论(0) 推荐(0)
摘要: #include<stdio.h> main(){ int i,j,k; for(i=1;i<=5;i++) { for(k=1;k<=i;k++) printf("*"); printf("\n"); } } #include<stdio.h> main(){ int i,j,k; for(i=1 阅读全文
posted @ 2021-11-24 22:57 微笑|哈哈 阅读(25) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { int mark; printf("请输入学生的分数(0-100):\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n"); case 8:printf(" 阅读全文
posted @ 2021-10-29 12:58 微笑|哈哈 阅读(16) 评论(0) 推荐(0)
摘要: include<stdio.h> main() { float n; scanf("%f",&n); if(n>0) {printf("正数\n");} else if (n==0) {printf("0既不是正数,也不是负数!\n");} else printf("负数\n"); } #inclu 阅读全文
posted @ 2021-10-25 21:49 微笑|哈哈 阅读(32) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { int a; float b; char c; scanf("%d%f%c",&a,&b,&c); printf("%d\n%f\n%c\n",a,b,c); } #include<stdio.h> main() { char ch; ch=ge 阅读全文
posted @ 2021-10-25 21:47 微笑|哈哈 阅读(31) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { int a=5; int b=7; printf("%d %d\n",a,b); } #include<stdio.h> main() { float a=5.3; double b=6.53; printf("%f %lf\n",a,b); } 阅读全文
posted @ 2021-10-14 22:59 微笑|哈哈 阅读(25) 评论(0) 推荐(0)
摘要: 1.编写程序,输出“我爱学习c语言!” #include<stdio.h> main() { printf("我爱学习c语言"); } 2.分行输出自己的专业和姓名 #include<stdio.h> main() { printf("计算机\n于佳琪\n"); 3.用*号输出字母c的图案 #inc 阅读全文
posted @ 2021-10-07 22:28 微笑|哈哈 阅读(12) 评论(0) 推荐(0)