- 游戏
- 2024-10-07 12:15:57 @
#include<bits/stdc++.h>
#include<windows.h>
#include<algorithm>
#include<cstring>
#include<ctime>
using namespace std;
string a = "雷霆 速度10 过弯7 性能12 (1)\n";
string b = "疾风 速度10 过弯8 性能11 (2)\n";
string c = "恐龙 速度12 过弯6 性能10 (3)\n";
string d = "黑洞 速度14 过弯9 性能8 (4)\n";
string e = "星辰 速度6 过弯11 性能10 (5)\n";
int key = 0;//密码是"0"。
int q3(){
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到新手试炼赛\n";
for(int i = 1; i <= 10; i++){
cout << "更新中";
Sleep(500);
cout << '.';
Sleep(500);
cout << '.';
Sleep(500);
cout << '.';
cout << "\n";
}
return 2;
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int q2(){
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到全能决斗赛(12人)\n比赛即将开始\n";
Sleep(2000);
cout << "Ready?\n";
Sleep(1000);
cout << "Go!\n";
for(int i = 1; i <= 20; i++){
cout << "_______________________________________________\n";
}
srand(time(0));
int jd = 0;
for(int i = 1; i <= 10; i++){
Sleep(1000);
srand(time(0));
int s = rand()%+12+1;
cout << "第" << i << "个弯道你排到了第" << s << "名" << endl;
jd += 12-s;
}
srand(time(0));
jd *= 12;
int r = rand()%12+1;
cout << "你的总分是" << jd << "分\n排名第" << r << endl;
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int q1(){
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到个人挑战赛\n请选择你的赛车\n";
cout << a << b << c << d << e << "其他赛车持续更新中\n";
Sleep(2000);
int n;
cin >> n;
int pp;
if(n == 1 || n == 2){
srand(time(0));
int p = rand()%+1200+120;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 3){
srand(time(0));
int p = rand()%+1000+90;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 4){
srand(time(0));
int p = rand()%+600+1;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 5){
srand(time(0));
int p = rand()%+1500+140;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}
cout << "你本赛季的得分是:" << pp << "分\n";
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int main(){
cout << "key:";
int k;
cin >> k;
if(k != key){
cout << "再见";
Sleep(6500);
return 0;
}
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
cout << "欢迎来到极限赛车游戏\n这里提供个人挑战赛(1), 全能决斗赛(2)和新手试炼赛(3)";
Sleep(5000);
cout << "请选择(退出请按任意键)\n";
int n;
cin >> n;
if(n == 1){
loop:
if(q1() == 1){
goto loop;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else if(n == 2){
loop3:
if(q2() == 1){
goto loop3;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else if(n == 3){
loop4:
if(q3() == 1){
goto loop4;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else{
cout << "再见";
Sleep(6500);
return 0;
}
cout << "再见";
Sleep(6500);
return 0;
}
1 条评论
-
王晟懿 LV 4 @ 2024-10-07 12:17:20
#include<bits/stdc++.h>
#include<windows.h>
#include<algorithm>
#include<cstring>
#include<ctime>
using namespace std;
string a = "雷霆 速度10 过弯7 性能12 (1)\n";
string b = "疾风 速度10 过弯8 性能11 (2)\n";
string c = "恐龙 速度12 过弯6 性能10 (3)\n";
string d = "黑洞 速度14 过弯9 性能8 (4)\n";
string e = "星辰 速度6 过弯11 性能10 (5)\n";
int key = 0;//密码是"0"。
int q3(){
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到新手试炼赛\n";
for(int i = 1; i <= 10; i++){
cout << "更新中";
Sleep(500);
cout << '.';
Sleep(500);
cout << '.';
Sleep(500);
cout << '.';
cout << "\n";
}
return 2;
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int q2(){
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到全能决斗赛(12人)\n比赛即将开始\n";
Sleep(2000);
cout << "Ready?\n";
Sleep(1000);
cout << "Go!\n";
for(int i = 1; i <= 20; i++){
cout << "_______________________________________________\n";
}
srand(time(0));
int jd = 0;
for(int i = 1; i <= 10; i++){
Sleep(1000);
srand(time(0));
int s = rand()%+12+1;
cout << "第" << i << "个弯道你排到了第" << s << "名" << endl;
jd += 12-s;
}
srand(time(0));
jd *= 12;
int r = rand()%12+1;
cout << "你的总分是" << jd << "分\n排名第" << r << endl;
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int q1(){
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
Sleep(3000);
cout << "欢迎来到个人挑战赛\n请选择你的赛车\n";
cout << a << b << c << d << e << "其他赛车持续更新中\n";
Sleep(2000);
int n;
cin >> n;
int pp;
if(n == 1 || n == 2){
srand(time(0));
int p = rand()%+1200+120;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 3){
srand(time(0));
int p = rand()%+1000+90;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 4){
srand(time(0));
int p = rand()%+600+1;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}else if(n == 5){
srand(time(0));
int p = rand()%+1500+140;
cout << "你排到了全国第" << p << "名\n";
pp = (10000-p)/3;
Sleep(2000);
}
cout << "你本赛季的得分是:" << pp << "分\n";
cout << "想再来一次吗,想(1),不想(0)";
int ccc;
cin >> ccc;
if(ccc == 1){
Sleep(2000);
return 1;
}else if(ccc == 0){
Sleep(2000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
return 2;
}
}
int main(){
cout << "key:";
int k;
cin >> k;
if(k != key){
cout << "再见";
Sleep(6500);
return 0;
}
Sleep(3000);
for(int i = 1; i <= 100; i++){
cout << "_______________________________________________\n";
}
cout << "欢迎来到极限赛车游戏\n这里提供个人挑战赛(1), 全能决斗赛(2)和新手试炼赛(3)";
Sleep(5000);
cout << "请选择(退出请按任意键)\n";
int n;
cin >> n;
if(n == 1){
loop:
if(q1() == 1){
goto loop;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else if(n == 2){
loop3:
if(q2() == 1){
goto loop3;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else if(n == 3){
loop4:
if(q3() == 1){
goto loop4;
}else{
cout << "再见";
Sleep(6500);
return 0;
}
}else{
cout << "再见";
Sleep(6500);
return 0;
}
cout << "再见";
Sleep(6500);
return 0;
}
- 1