自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 C++ 数组排序

大家还在为大小排序而烦恼吗?今天让我我大家解决这个问题吧!

2022-12-20 09:39:01 211 1

原创 超级玛丽游戏

#include <bits/stdc++.h>using namespace std;int main(){ cout<<" ********\n ************\n ####....#.\n #..###.....##....\n ###.......###### ### #.

2022-05-08 08:58:19 486

原创 C++ 数组排序

大家还在为大小排序而烦恼吗?今天让我我大家解决这个问题吧!请看串代码——错了——#include <bits/stdc++.h>using namespace std;int main(){ int a[10010],i,b,j; cin>>b; for(i=1;i<=b;i++) { cin>>a[i]; } for(i=1;i<=b;i++) {

2022-03-19 18:35:41 1998

原创 有颜色的C++

今天让我为大家带来彩色的C++。方法一#include <bits/stdc++.h>using namespace std;int main(){ system("color F0"); cout<<"WZK"<<endl; return 0;}system("color F0");方法二#include <bits/stdc++.h>#include<windows.h>u...

2022-02-27 12:32:53 822

原创 彩色的C++

今天让我为大家带来彩色的C++。方法一#include <bits/stdc++.h>using namespace std;int main(){ system("color F0"); cout<<"WZK"<<endl; return 0;}方法二#include <bits/stdc++.h>#include<windows.h>using namespace std;void colo..

2022-02-26 18:54:16 580

原创 C++ 小玩意2.0

今天,我给大家做了一个简单的小游戏,大家快来看看吧!#include<bits/stdc++.h>using namespace std;int main(){ int a,c; c=0; char b; cout<<"请输入一个你的幸运数字:"; cin>>a; cout<<"请输入一个A~D中的一个:"; cin>>b; if(b=='A') { ...

2022-02-17 21:31:05 2732

原创 C++ 小玩意2.0

今天,我给大家做了一个简单的小游戏,大家快来看看吧!#include<bits/stdc++.h>using namespace std;int main(){ int a,c; c=0; char b; cout<<"请输入一个你的幸运数字:"; cin>>a; cout<<"请输入一个A~D中的一个:"; cin>>b; if(b=='A') {

2022-02-17 21:29:04 969

原创 C++ 小玩意2.0

今天,我又为大家设计了一个简单的小玩意,大家一起来看看吧!#include<bits/stdc++.h>using namespace std;int main(){ int a,c; c=0; char b; cout<<"请输入一个你的幸运数字:"; cin>>a; cout<<"请输入一个A~D中的一个:"; cin>>b; if(b=='A') {

2022-02-17 21:24:20 55

原创 小玩意1.0

#include<bits/stdc++.h>using namespace std;int main(){ int a,b,i,j; cin>>a>>b; for(i=1;i<=b-1;i++) { for(j=1;j<=a;j++) { cout<<"*"; } cout<<endl; } .

2022-02-17 17:49:27 228

原创 新年快乐1.0

#include<bits/stdc++.h>using namespace std;int main(){ cout<<"2222 0000 2222 2222 !!"<<endl; cout<<" 2 0 0 2 2 !!"<<endl; cout<<"2222 0 0 2222 2222 !!"<<endl; cout<<"2 0 0 2 .

2022-01-02 18:16:23 160

原创 猜单词游戏

#include <bits/stdc++.h>using namespace std;int main(){ int a=rand()%10; string b[11]={"tiger","lion","sweater","class","clock","boy","girl","cat","dog","pen"},d; cout<<"Please quess a word:"; while(cin>>d) { .

2021-12-26 21:08:56 2800 1

原创 奶牛的相似性

H.#include<bits/stdc++.h>using namespace std;int main(){ int n,m,a[101][101],b[101][101]; cin>>m>>n; int i,j,r=0; for(i=1;i<=n;i++) { for(j=1;j<=m;j++) cin>>a[i][j]; } for(

2021-12-22 17:30:45 550

原创 猜字母游戏

​#include<bits/stdc++.h>using namespace std;int main(){ srand(time(0)); char a=rand()%26+'A',b; cout<<"Please quess a letter:"; while(cin>>b) { if(a==b) { cout<<"You're right!"&lt.

2021-12-18 17:13:45 1543

原创 scanf,1.0

对于cin和scanf大家肯定忙但是有时scanf比cin的有用的多#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,king; king=a; cin>>a; { cout<<","; } cin>>b; { cout<<","; } cin>

2021-12-18 12:36:54 547

原创 Algorithm yyds

今天我来介绍一位大卡----Algorithm yyds!猜单词系列栏目全链接_algorithmyyds的博客-CSDN博客这就是他的大作!快去一键三连吧!

2021-12-15 21:54:22 78

原创 猜数游戏,2.0

#include<bits/stdc++.h>using namespace std;int main (){ srand(time(0)); int a=rand()%100+1,b; cout<<"Please quess a number."<<endl; while(cin>>b) { if(a==b) { cout<<"You're r.

2021-12-15 19:05:15 2960 2

原创 行李托运费

K. 行李托运费Description车站行李托运费标准是:10千克或10千克以下,每千克收费1.5元,超过10千克的行李,每超过1千克按2.5元进行收费。试编一程序,输入行李的托运费,算出行李的重量。Input读入一个实型值,表示行李的托运费。Output一个实型数,即行李的重量,保留两位小数。Sample Input3Sample Output2.00#include<bits/stdc++.h>using namespace

2021-12-15 17:30:52 2512

原创 数数小木块

L. 数数小木块Description在墙角堆放着一堆完全相同的正方体小木块,如下图所示:因为木块堆得实在是太有规律了,你只要知道它的层数就可以计算所有木块的数量了。Input只有一个整数 n ,表示这堆小木块的层数,已知1 <= n <= 100 。Output只有一个整数,表示这堆小木块的总数量。Sample Input5Sample Output35#include<bits/stdc++.h>usi

2021-12-15 17:29:19 4844

原创 韩信点兵二

B. 韩信点兵二Description有一个由很多个士兵组成的方队,若三个三个数,剩二个;若五个五个数,剩三个;若七个七个数,剩五个;现在还有一个信息就是知道这个方队人数一定不超过n个。请你编一个程序计算出这方队里最多有多少个士兵?Input输入一行一个正整数n,105<n<=10000。Output输出一行,一个正整数,即符合要求的方队的人数。Sample Input200Sample Output173#include<bits/st

2021-12-14 17:36:07 557

原创 韩信点兵二

B. 韩信点兵二Description有一个由很多个士兵组成的方队,若三个三个数,剩二个;若五个五个数,剩三个;若七个七个数,剩五个;现在还有一个信息就是知道这个方队人数一定不超过n个。请你编一个程序计算出这方队里最多有多少个士兵?Input输入一行一个正整数n,105<n<=10000。Output输出一行,一个正整数,即符合要求的方队的人数。Sample Input200Sample Output173#include<bits/st

2021-12-14 17:23:40 526

原创 韩信点兵一

A. 韩信点兵一Description有一个由很多个士兵组成的方队,若三个三个数,剩二个;若五个五个数,剩三个;若七个七个数,剩五个;现在还有一个信息就是知道这个方队人数一定超过n个。请你编一个程序计算出这方队里至少有多少个士兵?Input输入一行一个正整数n,1<n<=10000。Output输出一行,一个正整数,即符合要求的方队的人数。Sample Input100Sample Output173#include<bits/stdc+

2021-12-14 15:49:35 235

原创 【无标题】

A. 韩信点兵一Description有一个由很多个士兵组成的方队,若三个三个数,剩二个;若五个五个数,剩三个;若七个七个数,剩五个;现在还有一个信息就是知道这个方队人数一定超过n个。请你编一个程序计算出这方队里至少有多少个士兵?Input输入一行一个正整数n,1<n<=10000。Output输出一行,一个正整数,即符合要求的方队的人数。Sample Input100Sample Output173#include<bits/stdc.

2021-12-14 15:47:56 201

原创 猜数游戏,1.0

#include<bits/stdc++.h>using namespace std;int main (){ srand(time(0)); int a=rand()%10+1,b; cout<<"Please quess a number."<<endl; while(cin>>b) { if(a==b) cout<<"You're right!"<&.

2021-12-05 13:00:15 1743

原创 图形1,数字三角形。

#include<bits/stdc++.h>using namespace std;int main(){ int i,j,k,m,n,l; string a,b; cin>>m; for(i=1;i<=m;i++) { for(j=1;j<=m-i;j++) printf(" "); for(k=1;k<=2*i-1;k++) pri..

2021-12-03 18:42:18 230

原创 新龟兔赛跑

Description兔子又来找乌龟赛跑啦!同样的错误兔子不会犯两次,所以兔子提出赛跑的时候,乌龟就觉得这场比赛很 不公平。于是兔子进一步放宽了条件,表示他可以在比 赛开始以后先睡 t 分钟再开始追乌龟。乌龟这下没办法确定比赛到底公平不公平了,所以请你来帮忙。假设乌龟每分钟可以跑 x 米,兔子每分钟跑 y 米 (x < y)。他希望你计算最大的整数赛跑距离(米),满足乌龟能在兔子先睡 t 分钟的前提下,比兔子更早或同时到达终点。Input三个整数 x, y, tOutput一个

2021-11-27 12:42:28 442

原创 struct,2.0,数组的使用格式

#include<bits/stdc++.h>using namespace std;struct fin{ int year; string month; int day;};int main(){ fin p[2]= { {2021,"December",31}, {2022,"January",1} }; cout<<"Today is "<<p[0].year&.

2021-11-27 12:38:16 344

原创 struct,1.0,struct的用法

​#include<bits/stdc++.h>using namespace std;struct fin{ int year; string month; int day;};int main(){ fin p= { 2022, "December", 31 }; cout<<"This year is "<<p.year<<",tod.

2021-11-27 12:27:08 244

原创 ASCLL,char,无限转换2.0,比以前更方便

#include<bits/stdc++.h>using namespace std;int main(){ int a; while(cin>>a) cout<<(char)a; return 0;}就是这么简单!

2021-11-27 12:06:37 407 5

原创 自定义函数1,如何自定义。

#include <bits/stdc++.h>using namespace std;int a(int b,int c);//定义函数名int main(){ int i,j; cin>>i>>j; cout<<a(i,j)<<endl;//引用函数 return 0;}int a(int b,int c){ int d; d=pow(b,c);//pow(x,y)的意思是x的y次方...

2021-11-24 15:41:36 413

原创 string语句2. 倒着输出字符串

#include <bits/stdc++.h>using namespace std;int main(){ string b; int a,i; cin>>b; a=b.size();//表示b字符串的字符数量为a个 for(i=a;i>=1;i--) { cout<<b[i-1]; } return 0;}请不要忘记点赞加关注哟~~...

2021-11-21 12:04:26 516

原创 自定义函数2.递归

#include <bits/stdc++.h>using namespace std;int a(int b);//定义函数名int main(){ int i; cin>>i; cout<<a(i)<<endl;//调用函数 return 0;}int a(int b){ if(b==1) return 1; else return b*a(b-1);//计算b*...

2021-11-21 11:56:00 484

原创 自定义函数1.

#include <bits/stdc++.h>using namespace std;int a(int b,int c);//定义函数名int main(){ int i,j; cin>>i>>j; cout<<a(i,j)<<endl;//引用函数 return 0;}int a(int b,int c){ int d; d=pow(b,c);//计算b的c次方 retur...

2021-11-20 17:48:02 201

原创 string语句的应用1,输出字母“Z”。

#include <bits/stdc++.h>using namespace std;int main(){ int n,i; string a,b,c; cin>>n; c=""; for(i=1;i<=n;i++) cout<<'*'; cout<<endl; for(i=n-2;i>=1;i--) { a="";...

2021-11-20 13:21:08 237

原创 【无标题】ASCLL码无限转换

#include <bits/stdc++.h>using namespace std;int main(){ int a,b; cin>>a;//输入a个数。 for(int i=1;i<=a;i++) { cin>>b; cout<<(char)b;//强制转换char。 } return 0;}...

2021-11-19 17:39:31 191

空空如也

空空如也

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

TA关注的人

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