会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
崔花钱
博客园
首页
新随笔
联系
订阅
管理
1
2
下一页
2021年11月29日
第十一次作业
摘要: 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++;
阅读全文
posted @ 2021-11-29 20:41 崔花钱
阅读(27)
评论(0)
推荐(0)
2021年11月28日
第十二次作业
摘要: 1.实现一个菜单 可以切换 ,可以返回主菜单 主菜单 1.登录 2.注册 3.输出水仙花 4.退出程序 请选择: #include<stdio.h> #include<string.h> void denglu(); void zhuce(); void shuixianhua(); main()
阅读全文
posted @ 2021-11-28 20:59 崔花钱
阅读(25)
评论(0)
推荐(0)
2021年11月23日
第十次作业
摘要: 1.定义一个含有8个存储单元的实型数组,从键盘上接收数,然后逆序输出 #include<stdio.h> main() { int a[8],i; for(i=0;i<8;i++) { scanf("%d",&a[i]); } printf("逆序输出后\n"); for(i=7;i>=0;i--)
阅读全文
posted @ 2021-11-23 15:24 崔花钱
阅读(45)
评论(0)
推荐(0)
2021年11月22日
第九次作业
摘要: 1. 猜数字随机产生一个0-99的数,猜猜看如果大了 就提示大一点如果小了 就提示小一点直到才对为止 #include<stdio.h> #include<stdlib.h> #include<time.h> int main(){ int a; srand((unsigned)time(NULL)
阅读全文
posted @ 2021-11-22 21:04 崔花钱
阅读(28)
评论(0)
推荐(0)
2021年11月18日
第八次作业
摘要: 1.输出以下图形 #include <stdio.h> main() { int a,b,n; for(a=1;a<=5;a++) { printf("\n"); for(b=1;b<=a;b++) { printf("*"); } } } 2.输出以下图形 #include <stdio.h> m
阅读全文
posted @ 2021-11-18 20:47 崔花钱
阅读(9)
评论(0)
推荐(0)
2021年11月16日
第七次作业
摘要: 1.p60 1 #include <stdio.h> main() { int a=1,b=0; while(a<=21) { if(a%2) b=b+a; a++; } printf("%d",b); } 2.p60 2 #include <stdio.h> main() { int i=1,n;
阅读全文
posted @ 2021-11-16 12:12 崔花钱
阅读(15)
评论(0)
推荐(0)
2021年11月2日
第六次作业
摘要: 1.p70页一题 #include <stdio.h> main() { int n; printf("请输入一个数字"); scanf("%d",&n); if(n>0) printf("这个数字是正数"); else if(n==0) printf("这个数字是0"); else printf(
阅读全文
posted @ 2021-11-02 10:57 崔花钱
阅读(32)
评论(0)
推荐(0)
2021年11月1日
第五次作业
摘要: 1.教材P52 例4-8 #include <stdio.h> main() { int mark; printf("输入成绩\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n");break; case 8:
阅读全文
posted @ 2021-11-01 16:53 崔花钱
阅读(19)
评论(0)
推荐(0)
2021年10月27日
第四次作业
摘要: 1.编写程序,判断一个数n是正数还是负数。 #include <stdio.h> main() { int a; printf("请输入一个数"); scanf("%d",&a); if(a>0) printf("这是正数"); else printf("这是负数"); } 2.编写程序,计算出租车
阅读全文
posted @ 2021-10-27 20:51 崔花钱
阅读(40)
评论(0)
推荐(0)
2021年10月19日
第三次作业
摘要: 1、编写程序,使用scanf()函数接受整型、实型、字符型的变量,并分行依次输出。 #include <stdio.h> main() { int a; float b; char c; scanf("%d%f%c",&a,&b,&c); printf("%d%f%c",a,b,c); } 2.编写
阅读全文
posted @ 2021-10-19 11:32 崔花钱
阅读(18)
评论(0)
推荐(0)
1
2
下一页
公告