会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Cathycat
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
2019年7月18日
while 嵌套
摘要: #include<stdio.h>#include<stdlib.h>int main(){ int a,b,n; scanf("%d",&n); while(a<=n) { b=1; while(b<=a) { printf("%d ",a); b=b+1; } printf("\n"); a=a
阅读全文
posted @ 2019-07-18 20:45 Cathycat
阅读(121)
评论(0)
推荐(0)
2019年7月16日
两分钟倒计时
摘要: #include<stdio.h>#include<stdlib.h>#include<windows.h>int main(){ int a,b,c; a=120; while(a>=0) { b=a/60; c=a%60; system("cls"); printf("%d:%.2d",b,c)
阅读全文
posted @ 2019-07-16 22:43 Cathycat
阅读(369)
评论(0)
推荐(0)
倒计时
摘要: #include <bits/stdc++.h>#include<windows.h>int main() { int a; a=10; while(a>=0) { system("cls"); printf("%d",a); Sleep(1000); a=a-1; }return 0; }
阅读全文
posted @ 2019-07-16 22:24 Cathycat
阅读(96)
评论(0)
推荐(0)
阶乘
摘要: #include<stdio.h>#include<stdlib.h>int main() { int a,i,b; a=1; i=1; scanf("%d",&b); while(i<=b) { a=a*i; i=i+1; } printf("%d",a);return 0; }
阅读全文
posted @ 2019-07-16 22:14 Cathycat
阅读(149)
评论(0)
推荐(0)
|| &&
摘要: #include<stdio.h>#include<stdlib.h>int main() { int a,sum; a=1; sum=0; while(a<=100) {if(a%10==7||a%7==0) sum=sum+a; a=a+1; } printf("%d",sum); return
阅读全文
posted @ 2019-07-16 22:08 Cathycat
阅读(118)
评论(0)
推荐(0)
while&if
摘要: #include<stdio.h>#include<stdlib.h>int main() { int a; a=1; while(a<=100) { printf("%d ",a); a=a+1; } while(a>0) { printf("%d ",a); a=a-1; }return 0;
阅读全文
posted @ 2019-07-16 22:01 Cathycat
阅读(85)
评论(0)
推荐(0)
while
摘要: #include<stdio.h>#include<stdlib.h>int main() { system("color 0a"); while(1) { printf("你好"); }return 0; }
阅读全文
posted @ 2019-07-16 21:55 Cathycat
阅读(135)
评论(0)
推荐(0)
2019年7月15日
课时2
摘要: 基本运算符 - + 增量 ++ -- ++i 与i++区别 换行endl 分支 if语句 if 和else的就近配对方式 if{if} else switch 语句 switch () { case1:statement 1; break } 循环while 语句 Int 1,sum=0; whil
阅读全文
posted @ 2019-07-15 16:43 Cathycat
阅读(116)
评论(0)
推荐(0)
上一页
1
2
3
公告