
Lv.1
我们人体就是一台电脑,大脑是主机......
签名:https://shequ.codemao.cn/work/172305931 看看我的作品,求求了!!!!! https://shequ.codemao.cn/work/191166025 一键三连,还有主页的作品。 QAQ TAT 求求了!
在 c++教程2【猜数游戏(从1的升级) 中回复
#include<bits/stdc++.h>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
int a,b,c;//a要2的数,b商,c余数(得数)
cin>>a;
for(a;b!=1;a--) {
c=a%2;
b=a/2;
a=b;
}
cout<<c;
return 0;
}
![]()
正好,C++
2022-12-19T21:20:15 点赞:0
在 c++教程2【猜数游戏(从1的升级) 中回复
#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;
}
2022-12-19T21:22:54 点赞: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;
}
2022-12-19T21:24:35 点赞: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;
}
2022-12-19T21:24:49 点赞:0
在 【爵士的简单易懂的C++ OI教程】数论问题全面详解 中回复
########################## ?tê???μ? ###################################
ó??éìáê?£oA=1,J=11,Q=12,K=13
????3???3éμ?μ?μúò???£o
2023-02-24T15:01:07 点赞:0
在 如何制作出精美的残影效果(含2种-适合萌新,大佬勿喷) 中回复
看看我的作品,求求了!!!!!
https://shequ.codemao.cn/work/191166025
一键三连,还有主页的作品。
QAQ TAT 求求了!




2023-08-21T20:04:27 点赞:2
在 如何制作出精美的残影效果(含2种-适合萌新,大佬勿喷) 中回复
看看我的作品,求求了!!!!!
https://shequ.codemao.cn/work/191166025
一键三连,还有主页的作品。
QAQ TAT 求求了!
2023-08-21T20:04:32 点赞:1
在 求招人 (Windows微软Microsoft公司) 中回复
看看我的作品,求求了!!!!!
https://shequ.codemao.cn/work/191166025
一键三连,还有主页的作品。
QAQ TAT 求求了! 2023-08-25T11:17:43 点赞:0