会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
薛莹莹
博客园
首页
新随笔
联系
订阅
管理
2021年11月29日
第十一次作业
摘要: 1.实现一个菜单 #include<stdio.h> #include<string.h> void denglu(); void zhuce(); void shuixianhua(); main() { int a; printf("请选择\n1.登录\n2.注册\n3.输出水仙花数\n4.退出
阅读全文
posted @ 2021-11-29 21:40 薛莹莹
阅读(6)
评论(0)
推荐(0)
2021年11月24日
第九次作业
摘要: 1、定义一个含有8个存储单元的实行数组,从键盘上接收数,然后逆序输出 #include <stdio.h>main(){ int a[8],i,j; for( i=0;i<8;i++ ) { printf( "请输入第 %d数字",i+1 ); scanf( "%d",&a[i] ); } for(
阅读全文
posted @ 2021-11-24 22:28 薛莹莹
阅读(5)
评论(0)
推荐(0)
第八次作业
摘要: P121 1题 #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]); } } P121 2题 #include<
阅读全文
posted @ 2021-11-24 22:12 薛莹莹
阅读(7)
评论(0)
推荐(0)
2021年11月23日
第十次作业
摘要: 1.#include <stdio.h> main() { char str[20]; int i,cnt; cnt=i=0; gets(str); while(str[i]!='\0') } if(str[i]>='A'&& str[i]<='Z') cnt++; i++; } printf("大
阅读全文
posted @ 2021-11-23 09:46 薛莹莹
阅读(4)
评论(0)
推荐(0)
2021年11月9日
第七次作业
摘要: 输出如下形状 ******* ***** *** * * ** *** **** ***** #include <stdio.h> main() { int i,a; for (i=1;i<=5;i++) { for (a=1;a<=i;a++) printf("*"); printf("\n");
阅读全文
posted @ 2021-11-09 13:31 薛莹莹
阅读(17)
评论(0)
推荐(0)
2021年10月31日
第六次作业
摘要: 1.教材P52 例4-8 分数转成等级 switch #include <stdio.h> main() { int mark; printf("输入成绩\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n");
阅读全文
posted @ 2021-10-31 13:24 薛莹莹
阅读(25)
评论(0)
推荐(0)
2021年10月29日
第五次作业
摘要: 1. 教材P52 例4-8 分数转成等级 switch #include <stdio.h> main() { int mark; printf("输入成绩\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n")
阅读全文
posted @ 2021-10-29 13:35 薛莹莹
阅读(29)
评论(0)
推荐(0)
2021年10月22日
第四次作业
摘要: 编写程序,判断一个数n是正数还是负数 #include <stdio.h> main(){ int n; printf("请输入一个数"); scanf("%d",&n); if(n<0){ printf("%d是一个负数",n); } else{ printf("%d是一个正数",n); } }
阅读全文
posted @ 2021-10-22 08:04 薛莹莹
阅读(27)
评论(0)
推荐(0)
2021年10月17日
第三次作业
摘要: 编写程序,使用scanf()函数接收整型、实型、字符型的变量,并分行依次输出。 #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); }
阅读全文
posted @ 2021-10-17 22:33 薛莹莹
阅读(26)
评论(0)
推荐(0)
2021年10月15日
第二次作业
摘要: 1,编写程序,定义两个整型变量,赋值并输出 #include<stdio.h> main(){ int a=3; int b=4; printf("%d %d\n",a,b); } 2.编写程序,定义一个单精度和一个双精度的变量,赋值并输出 #include<stdio.h> main(){ flo
阅读全文
posted @ 2021-10-15 14:12 薛莹莹
阅读(15)
评论(0)
推荐(0)
下一页
公告