会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
宗谷
博客园
首页
新随笔
联系
订阅
管理
随笔 - 11
文章 - 0
评论 - 0
阅读 -
1416
2021年11月27日
第十一次作业
摘要: 1.实现一个菜单. #include <stdio.h> #include <string.h> void mainMenu(); void login(); void regist(); void shuiXianHua(); void returnToMenu(); main() { mainM
阅读全文
posted @ 2021-11-27 21:01 宗谷
阅读(111)
评论(0)
推荐(0)
2021年11月25日
第十次作业
摘要: 1、编写程序,统计字符串中大写字母的个数 #include <stdio.h> main() { char str[80]; int i=0; int cnt=0; printf("请输入你的字母:"); gets(str); while ( str[i]!='\0' ) { if ( str[i]
阅读全文
posted @ 2021-11-25 21:07 宗谷
阅读(90)
评论(0)
推荐(0)
2021年11月22日
第六次作业
摘要: 1、使用while语句求和sum=1+3+5+……+21 #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的奇数
阅读全文
posted @ 2021-11-22 16:55 宗谷
阅读(118)
评论(0)
推荐(0)
2021年11月19日
第九次作业
摘要: 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] ); } fo
阅读全文
posted @ 2021-11-19 22:43 宗谷
阅读(90)
评论(0)
推荐(0)
2021年11月12日
第八次作业
摘要: 1. 猜数字:随机产生一个0-99的数,猜猜看如果大了就提示大了点如果小了就提示小了点直到猜对为止 #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int a,n; srand((unsigned)time(
阅读全文
posted @ 2021-11-12 20:27 宗谷
阅读(94)
评论(0)
推荐(0)
2021年11月9日
第七次作业
摘要: 1.输出图形 #include <stdio.h> main() { int i,j; for(i=1;i<=5;i++) { for(j=1;j<=i;j++) { printf("*"); } printf("\n"); } } 2.输出图形 #include <stdio.h> main()
阅读全文
posted @ 2021-11-09 10:05 宗谷
阅读(119)
评论(0)
推荐(0)
2021年10月30日
第五次作业
摘要: 1.编写程序判断n是正数还是负数 #include <stdio.h> main() { double n; printf("请输入一个值n="); scanf("%lf",&n); if (n>0){ printf("n是正数"); }else if (n<0){ printf("n是负数");
阅读全文
posted @ 2021-10-30 15:12 宗谷
阅读(112)
评论(0)
推荐(0)
2021年10月26日
第四次作业
摘要: 1.编写程序,将输入的分数mark(0~100)转换为相应的等级(90-100)为A,(80-89)为B,(70-79)为C,(60-69)为D,(0~59)为NO PASS! #include<stdio.h> main() { int mark; printf("输入学生的分数(0-100):"
阅读全文
posted @ 2021-10-26 10:54 宗谷
阅读(144)
评论(0)
推荐(0)
2021年10月19日
第三次作业
摘要: 1.判断一个数n是正数还是负数 #include<stdio.h> main() { float n; printf("请输入一个数"); scanf("%f",&n); if (n>0){ printf("正数\n"); }else if (n==0){ printf("输出的数为0\n"); }
阅读全文
posted @ 2021-10-19 10:49 宗谷
阅读(133)
评论(0)
推荐(0)
2021年10月12日
第二次作业
摘要: 1、编写程序,定义两个整形变量,赋值并输出。 #include<stdio.h> main() { int a=1,b=2; printf("%d\n%d\n",a,b); } 2、编写程序,定义一个单精度和一个双精度的变量,赋值并输出。 #include<stdio.h> main() { flo
阅读全文
posted @ 2021-10-12 10:36 宗谷
阅读(170)
评论(0)
推荐(0)
下一页
公告
昵称:
宗谷
园龄:
3年8个月
粉丝:
3
关注:
0
+加关注
<
2025年6月
>
日
一
二
三
四
五
六
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔档案
2021年11月(6)
2021年10月(4)
2021年9月(1)
阅读排行榜
1. 第一次作业(235)
2. 第二次作业(170)
3. 第四次作业(144)
4. 第三次作业(133)
5. 第七次作业(119)
点击右上角即可分享