自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 C语言 推箱子游戏

#include <iostream>#include <cstdio>#include <string.h>#include <conio.h>#include <windows.h>using namespace std;int main(){ char a[50][50]={"##########", "## ###", "##X##

2021-02-04 11:53:36 288

原创 C语言 getche()与getch() #include<conio.h>

getchar()读取一个字符,等待用户按enter后结束(带回显)getche()读取一个字符,输入后立刻获取字符,不用按enter(带回显)getch()读取一个字符,输入后立刻获取字符,不用按enter(不带回显)注意:使用getche()和getch()需要导入#include<conio.h>...

2021-01-30 22:45:23 1080

原创 C语言 编写倒计时程序

编写一个两分钟的倒计时。形如2:00 1:59 1:58 1:57…1:00 0:59 0:58…0:01 0:00#include <iostream>#include <cstdio>#include<windows.h>using namespace std;int main(){ int a=2,b=0; while(a>=0){ printf("%d:%02d",a,b);

2021-01-22 16:02:03 11479 1

原创 C语言 输入一个整数n,求出其阶乘

输入一个整数n,求出其阶乘#include <iostream>#include <cstdio>using namespace std;int main(){ int a=1,n; printf("输入整数n的值:"); scanf("%d",&n); while(n>0){ a=n*a; n=n-1; } printf("%d\n",a);

2021-01-22 15:24:38 10122 4

原创 C语言 依次打印1、2、3…99、100、99、98、97…1

C语言 依次打印1、2、3…99、100、99、98、97…1#include <iostream>#include <cstdio>using namespace std;int main(){ int a=1; while(a<=99){ printf("%d ",a); a=a+1;} while(a>0){ printf("%d ",a); a=a-1;

2021-01-22 14:48:42 918

原创 C语言键盘输入任意四个整数,将其从小到大排列

键盘输入任意四个整数,将其从小到大排列#include <iostream>#include <cstdio>using namespace std;int main(){ int a,b,c,d,t; printf("数字排序程序\n"); printf("输入四个数用空格隔开:"); scanf("%d %d %d %d",&a,&b,&c,&d); if(a>b){t=a,a=b,b=t;}

2021-01-16 23:22:36 28515 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除