会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
计算机2106尹金袁
博客园
首页
新随笔
联系
订阅
管理
2021年11月27日
第十二次作业
摘要: 1.实现一个菜单 可以切换 ,可以返回主菜单 主菜单 1.登录 2.注册 3.输出水仙花数 4.退出程序 请选择: 选择后实现对应的功能 #include<stdio.h> #include<string.h> void a(); void b(); void c(); void d(); void
阅读全文
posted @ 2021-11-27 20:35 计算机2106尹金袁
阅读(17)
评论(0)
推荐(0)
2021年11月25日
第十一次作业
摘要: 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
阅读全文
posted @ 2021-11-25 19:39 计算机2106尹金袁
阅读(15)
评论(0)
推荐(0)
2021年11月16日
第十次作业
摘要: 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<st
阅读全文
posted @ 2021-11-16 12:17 计算机2106尹金袁
阅读(14)
评论(0)
推荐(0)
2021年11月12日
第九次作业
摘要: 猜数字: 随机产生一个0-99的数,猜猜看 如果大了 就提示大了点 如果小了 就提示小了点 直到猜对为止 #include <stdio.h> #include <stdlib.h> #include <time.h> main(){ int x,guess; srand((unsigned int
阅读全文
posted @ 2021-11-12 20:12 计算机2106尹金袁
阅读(18)
评论(0)
推荐(0)
2021年11月9日
第八次作业
摘要: 输出正三角 #include<stdio.h> main(){ int i,j; for(i=1;i<=6;i++){ for(j=1;j<=i;j++){ printf("*"); } printf("\n"); } } 输出倒三角 #include<stdio.h> main(){ int i,
阅读全文
posted @ 2021-11-09 10:08 计算机2106尹金袁
阅读(15)
评论(0)
推荐(0)
2021年11月4日
第七次作业
摘要: 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-04 17:46 计算机2106尹金袁
阅读(9)
评论(0)
推荐(0)
2021年11月1日
第六次作业
摘要: 1.编写程序判断n是正数还是负数。 #include<stdio.h> main() { int n; printf("输入一个整数:\n"); scanf("%d",&n); if(n>0) printf("%d是正数!\n",n); else if(n==0) printf("%d既不是正数,也
阅读全文
posted @ 2021-11-01 19:51 计算机2106尹金袁
阅读(11)
评论(0)
推荐(0)
2021年10月26日
第五次作业
摘要: 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-26 10:40 计算机2106尹金袁
阅读(18)
评论(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("0既不是正数,也不是负数!\n"); else printf(
阅读全文
posted @ 2021-10-19 16:44 计算机2106尹金袁
阅读(32)
评论(0)
推荐(0)
2021年10月18日
第三次作业
摘要: 1.编写程序,使用scanf()接收整型·实型·字符型的变量,并分行依次输出。 #include <stdio.h> main() { int a=1; float b=2; char c='5'; printf("%d\n%f\n%c\n",a,b,c); } 2.编写程序,通过scanf()函数
阅读全文
posted @ 2021-10-18 21:53 计算机2106尹金袁
阅读(28)
评论(0)
推荐(0)
下一页
公告