会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
吴珂珂
博客园
首页
新随笔
联系
订阅
管理
2021年11月30日
第十一次作业
摘要: 1.实现一个菜单 可以切换 ,可以返回主菜单 主菜单 1.登录 2.注册 3.输出水仙花数 4.退出程序 请选择: #include <stdio.h> #include <string.h> void menu(); void zhuce(); void denglu(); void shuixi
阅读全文
posted @ 2021-11-30 18:52 吴珂珂
阅读(33)
评论(0)
推荐(0)
2021年11月18日
第十次作业
摘要: 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("%
阅读全文
posted @ 2021-11-18 20:37 吴珂珂
阅读(18)
评论(0)
推荐(0)
2021年11月14日
第九次作业
摘要: 1. 猜数字: 随机产生一个0-99的数,猜猜看 如果大了 就提示大了点 如果小了 就提示小了点 直到猜对为止 #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int a,b,c; srand((unsign
阅读全文
posted @ 2021-11-14 11:13 吴珂珂
阅读(32)
评论(0)
推荐(0)
2021年11月11日
第八次作业
摘要: 1. 输出如下形状 ******* ***** *** * * ** *** **** ***** #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-11 18:49 吴珂珂
阅读(30)
评论(0)
推荐(0)
2021年11月2日
第七次作业
摘要: 1,#include<stdio.h> main(){ int i=1;int sum=0; while(i<=21) {sum+=i; i+=2; } printf("sum=%d\n",sum); } 2, #include<stdio.h> main(){ int i=1;double sum
阅读全文
posted @ 2021-11-02 17:24 吴珂珂
阅读(28)
评论(0)
推荐(0)
2021年10月31日
第六次作业
摘要: 1.编写程序判断n是正数还是负数。 1.#include <stdio.h> main() { float n; printf("输入一个数:\n"); scanf("%f",&n); if(n>0) printf("正数\n"); else if(n==0) printf("既不是正数也不是负数\
阅读全文
posted @ 2021-10-31 09:59 吴珂珂
阅读(37)
评论(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:20 吴珂珂
阅读(14)
评论(0)
推荐(0)
2021年10月19日
第四次作业
摘要: 1. 编写程序,判断一个数n是正数还是负数。 #include<stdio.h> main() { float n; scanf("%f",&n); if(n>0){ printf("正数\n"); }else if(n==0){ printf("既不是正数,也不是负数\n"); }else{ pr
阅读全文
posted @ 2021-10-19 11:00 吴珂珂
阅读(26)
评论(0)
推荐(0)
2021年10月18日
第三次作业
摘要: 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-18 17:27 吴珂珂
阅读(38)
评论(0)
推荐(0)
2021年10月16日
第二次作业
摘要: 1,编写程序,定义两个整型变量,赋值并输出 #includ1e<stdio.h> main(){ int a=3; int b=4; printf("%d %d\n",a,b); } 2.编写程序,定义一个单精度和一个双精度的变量,赋值并输出 #include<stdio.h> main(){ fl
阅读全文
posted @ 2021-10-16 14:19 吴珂珂
阅读(36)
评论(0)
推荐(0)
下一页
公告