摘要: #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 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(345) 评论(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 阅读(89) 评论(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 阅读(143) 评论(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 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(83) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>int main() { system("color 0a"); while(1) { printf("你好"); }return 0; } 阅读全文
posted @ 2019-07-16 21:55 Cathycat 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 基本运算符 - + 增量 ++ -- ++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 阅读(109) 评论(0) 推荐(0) 编辑