猫史档案馆


快来吸欧气

用户:学霸8号学霸8号查看:9 回复:24 评论:9 创建时间:2022-12-12T16:50:48


昨天闲的没事,就搞了个稀有源码蛋

结果……(这欧气也太好了吧)center_image

 


回复

上一页1 页 / 共 1下一页
NegateNegate

切,看我从紫蛋里开的。center_image

点赞2


评论


无邪a无邪a

呼,我开了只得到编程猫,之前得到一个天气宝宝

点赞0


评论


凤仙花射手凤仙花射手

我的他喵才3个紫和8个绿

点赞0


评论


EveroseEverose

我已经有小布丁了

点赞0


评论


lily百合lily百合

我用两个稀有出了巴巴和布布

点赞0


评论


我叫昵称我叫昵称

第一眼看成编程猫,非酋没救了……

点赞2


评论


名字不能是七名字不能是七

我只想要紫色,结果只有金

点赞0


评论


好吃的培根好吃的培根

#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void Start();
void GetResults();
int i, j, life, maxrand;
char c;
void Start() {
i = 0;
j = 0;
life = 0;
maxrand = 6;
cout << "Select difficulty mode:\n";// the user has to select a difficutly level
cout << "1 : Easy (0-15)\n";
cout << "2 : Medium (0-30)\n";
cout << "3 : Difficult (0-50)\n";
cout << "or type another key to quit\n";
c = 30;

cin >> c; // read the user's choice
cout << "\n";

switch (c) {
case '1':
maxrand = 15; // the random number will be between 0 and maxrand
break;
case '2':
maxrand = 30;
break;
case '3':
maxrand = 50;
break;
default:
exit(0);
break;
}

life = 5; // number of lifes of the player
srand((unsigned)time(NULL)); // init Rand() function
j = rand() % maxrand; // j get a random value between 0 and maxrand

GetResults();
}

void GetResults() {
if (life <= 0) { // if player has no more life then he loses
cout << "You lose !\n\n";
Start();
}

cout << "Type a number: \n";
cin >> i;

if((i>maxrand) || (i<0)) { // if the user number isn't correct, restart
cout << "Error: number not between 0 and \n" << maxrand;
GetResults();
}

if(i == j) {
cout << "YOU WIN!\n\n"; // the user found the secret number
Start();
} else if(i>j) {
cout << "Too BIG\n";
life = life - 1;
cout << "Lives remaining: " << life << "\n\n";
GetResults();
} else if(i<j) {
cout << "Too SMALL\n";
life = life - 1;
cout << "Lives remaining: " << life << "\n\n";
GetResults();
}
}

int main() {
cout << "** Jackpot game **\n";
cout << "The goal of this game is to guess a number.\n";
cout << "Jackpot will tell you if the number is too big or too\n";
cout << "喵all compared to the secret number to find.\n\n";
Start();
return 0;
}

点赞0


评论


巴巴和布布(终端精灵)巴巴和布布(终端精灵)

就这样吗?

点赞0


评论


超级无敌宇宙霹雳大爆炸帅气超级无敌宇宙霹雳大爆炸帅气

芽芽牛和派派海龟

点赞0


评论


FYYYYYYYFYYYYYYY

吸吸欧气喔~

 

点赞0


评论


xusimiaoxusimiao

布布我也有啦emotion_酷

点赞0


评论


一回合一回合

吸欧气

 

点赞0


评论


adalihpIcadalihpIc

ER25]

点赞0


评论


adalihpIcadalihpIc

12W34E67

点赞0


评论


NegateNegate

我的center_imagecenter_image

点赞0


评论


运川运川

谢谢欧气

点赞0


评论


倔强的飞叶龙TRf_倔强的飞叶龙TRf_

布布是我第二个精灵得啦!

点赞0


评论


倔强的飞叶龙TRf_倔强的飞叶龙TRf_

emotion_芒果得意emotion_酷

点赞0


评论


威武的多小多威武的多小多

我的center_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_image

点赞0


评论


Renegade_WRenegade_W

az

你们都好强啊qwq

不像我啥都没有

不信等周末来看())

点赞0


评论


隐凤之龙隐凤之龙

emotion_编程猫_点赞emotion_心

点赞0


评论


啦啦啦没作业啦啦啦没作业

我今天孵出了一个布布!

emotion_编程猫_嗨起来

点赞0


评论


一粒工具米一粒工具米

本穷  鬼工具米来晒精灵了

center_imagecenter_imagecenter_image

点赞0


评论