会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
鹏宇0240
博客园
首页
新随笔
联系
订阅
管理
2021年12月8日
第十二次作业
摘要: #include<stdio.h> #include<string.h> void mainMenu(); void denglu(); void zhuce(); void shuixianhua(); void returnToMenu(); main(){ mainMenu(); } void
阅读全文
posted @ 2021-12-08 22:37 鹏宇0240
阅读(32)
评论(0)
推荐(0)
2021年12月4日
第十一次作业
摘要: 1.用循环结构求字符串长度 #include<stdio.h> main() { char a[20]; int i=0,flag=0; gets(a); while(a[i]!='\0'){ flag++; i++; } printf("输入的字符串的长度是%d\n",flag); } 2.编写程
阅读全文
posted @ 2021-12-04 21:18 鹏宇0240
阅读(25)
评论(0)
推荐(0)
2021年12月2日
第七次作业
摘要: 1.定义一个含有8个储存单位的实型数组 #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\n",m[i]); } 2。使
阅读全文
posted @ 2021-12-02 19:54 鹏宇0240
阅读(32)
评论(0)
推荐(0)
2021年11月19日
第九次作业
摘要: 1.猜数字,随机产生一个0-99的数字,猜猜看如果大了,就提示大了点,小了就提示小了点,直到猜对为止。 #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int a, b ,c=0; srand((unsign
阅读全文
posted @ 2021-11-19 21:26 鹏宇0240
阅读(30)
评论(0)
推荐(0)
第十次作业
摘要: 1.定义一个含有8个储存单元的实型数组,从键盘上接收数,然后逆序输出。 #include <stdio.h> main(){ double a[8]; int i; for (i=0;i<7;i++) scanf("%lf",&a[i]); for(i=7;i>=0;i--) printf("%f"
阅读全文
posted @ 2021-11-19 18:40 鹏宇0240
阅读(35)
评论(0)
推荐(0)
2021年11月9日
第八次作业
摘要: 1. 输出以下图形 *************** #include<stdio.h> main() { int a, b; for(a = 1; a <= 5; a++){ for (b = 1; b <= a; b++ ) printf("*"); printf("\n"); } } 2.输入图
阅读全文
posted @ 2021-11-09 22:08 鹏宇0240
阅读(25)
评论(0)
推荐(0)
2021年11月1日
第四次作业
摘要: 1.编写程序,判断一个数n是正数还是负数。 #include <stdio.h> main() { int n; printf("请输入一个数:\n"); scanf_s("%d", &n); if (n > 0) printf("n为正数"); else if (n == 0) printf("n
阅读全文
posted @ 2021-11-01 23:45 鹏宇0240
阅读(42)
评论(0)
推荐(0)
第六次作业
摘要: 1.编写程序判断n是正数还是负数。 #include <stdio.h> main() { int n; printf("请输入一个数:\n"); scanf_s("%d", &n); if (n > 0) printf("n为正数"); else if (n == 0) printf("n既不是正
阅读全文
posted @ 2021-11-01 22:57 鹏宇0240
阅读(21)
评论(0)
推荐(0)
2021年10月31日
第五次作业
摘要: 教材P52 例4-8 分数转成等级 switch #include <stdio.h> main(){ int mark; printf("请输入学生的分数(0-100):\n"); scanf_s("%d",&mark); switch(mark/10) { case 10: //与case9:共
阅读全文
posted @ 2021-10-31 11:18 鹏宇0240
阅读(9)
评论(0)
推荐(0)
2021年10月20日
第三次作业
摘要: 1.编写程序,使用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-20 19:07 鹏宇0240
阅读(12)
评论(0)
推荐(0)
下一页
公告