0
已解决
熊智晖
高级天翼
高级天翼
废话不说,上代码
#include<iostream>
#include<bits/stdc++.h>
#include<windows.h>
#include<winioctl.h>
#include<assert.h>
#include<ctype.h>
#include<cstdlib>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<cstdio>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<stdint.h>
#include<tgmath.h>
#include<assert.h>
#define CLS SetPos(1000,1000)
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<cmath>
#include<algorithm>
#include<string>
#include<conio.h>
#include<iomanip>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<conio.h>
#include <winable.h>
#pragma GCC optimize(2)
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define sla1 1865
#include<vector>
#include<string>
#include<cstdlib>
#include<ctime>
#include<iomanip>
#include<conio.h>
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define sla1 1865
#pragma GCC diagnostic error "-std=c++11"
#pragma GCC target("avx")
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(3)
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define sla1 1865
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define sla1 1865
using namespace std;
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}
float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
return y;
}
return 0.0f;
}
void clear(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 };
SetConsoleCursorPosition( hConsole, coordScreen );
}
void full_screen()
{
HWND hwnd = GetForegroundWindow();
int cx = GetSystemMetrics(SM_CXSCREEN); /* 屏幕宽度 像素 */
int cy = GetSystemMetrics(SM_CYSCREEN); /* 屏幕高度 像素 */
LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE); /* 获取窗口信息 */
/* 设置窗口信息 最大化 取消标题栏及边框 */
SetWindowLong(hwnd,GWL_STYLE,(l_WinStyle | WS_POPUP | WS_MAXIMIZE) & ~WS_CAPTION & ~WS_THICKFRAME & ~WS_BORDER);
SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, 0);
}
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("答题游戏4.0"); // 设置窗口的标题
COORD size = {120, 30};//设置窗口大小
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 110, 30};
SetConsoleWindowInfo(hOut,true ,&rc);
}
void retr(){//退出程序
HWND hWnd=GetForegroundWindow();
ShowWindow(hWnd,SW_HIDE);
exit(0);
}
void f(int a,int b){
while(1){
if(GetAsyncKeyState(VK_RETURN)&0x8000){
while(1){
SetCursorPos(a,b);
mouse_event (MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
Sleep(30);
if(GetAsyncKeyState(VK_TAB)&0x09){
break;
}
}
break;
}
}
}
int main(){
int c,cnt=0;
double q=0;
console();
cout<<"\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t欢迎来到,答题游戏4.0版本。";
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 70");
Sleep(1400);
system("cls");
for(int kai=1;kai<=100;kai++){
if(q>=100){
system("cls");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t 加载完成!";
Sleep(2000);
break;
}
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t "<<q<<"%";
Sleep(1);
q+=1;
system("cls");
}
clear();
Sleep(1000);
cout<<"输入你的名字:";
string name;
cin>>name;
Sleep(500);
cout<<"\n\n你好,"<<name<<"。加油!";
Sleep(2000);
system("cls");
cout<<"\n\n\n\n\n\n\n\n\n"<<"\t\t\t\t **不良游戏";
cout<<" "<<"\t\t\t拒绝盗版游戏";
Sleep(500);
cout<<"\n"<<"\t\t\t\t 注意自我保护";
cout<<" "<<"\t\t\t谨防受骗上当";
Sleep(500);
cout<<"\n"<<"\t\t\t\t 适度游戏益脑";
cout<<" "<<"\t\t\t沉迷游戏伤身";
Sleep(500);
cout<<"\n"<<"\t\t\t\t 合理安排时间";
cout<<" "<<"\t\t\t享受健**活";
Sleep(3000);
system("cls");
cout<<"作者:";
Sleep(300);
cout<<"熊";
Sleep(300);
cout<<"智";
Sleep(300);
cout<<"晖";
Sleep(900);
cout<<"\n出版:金光工作室";
Sleep(200);
cout<<"\n 宫 成 LV.7(室 长)";
Sleep(200);
cout<<"\n张 恩 昊LV.5(推荐组)";
Sleep(200);
cout<<"\n熊 智 晖LV.8(**组)";
Sleep(200);
cout<<"\n张 百 川LV.8(**组)";
Sleep(200);
cout<<"\n张 以 沫LV.7(修改组)";
Sleep(200);
cout<<"\n包 涵 宇LV.9(副室长)";
Sleep(200);
cout<<"\n谭 迪 元LV.9(修改组)";
Sleep(200);
cout<<"\n李 子 杰LV.7(**组)";
Sleep(200);
cout<<"\n李 明 昕LV.6(**组)";
Sleep(200);
cout<<"\n王 文 博LV.10(修改组)";
Sleep(2500);
system("cls");
cout<<"\n\n\t\t\t\t\t\t\t\t鸣谢\n\n\t\t\t\t\t\t\t1.宣海宁\n\n\t\t\t\t\t\t\t2.李宜和\n\n\t\t\t\t\t\t\t3.陈梓恒\n\n\t\t\t\t\t\t\t4.汪子晨";
Sleep(3000);
system("cls");
cout<<"\n\n\n\n\n\t\t\t\t ____________________________________________________";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t 1.开始游戏\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t 2.关机代码\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t 3.退出游戏\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t 4.音乐 \t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t 5.其他 \t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |\t\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t |版本:4.0"<<"\t\t\t\t\t |";
Sleep(60);
cout<<"\n\t\t\t\t -----------------------------------------------------\n\t\t\t\t\t\t请输入:";
int b;
cin>>b;
if(b==1){
system("cls");
Sleep(500);
cout<<"准备好了吗?";
Sleep(500);
cout<<"\n\nLet'go!";
Sleep(2000);
system("cls");
cout<<"1.1.0版 2.2.0版 3.3.0版 4.4.0版";
int sd;
cin>>sd;
if(sd==1){
system("cls");
Sleep(500);
cout<<"准备好了吗?";
Sleep(500);
cout<<"\n\nLet'go!";
Sleep(2000);
system("cls");
cout<<"1/1";
cout<<"\n1.中国的首都是哪个?";
Sleep(100);
cout<<"\n A.纽约 B.伦敦 C.北京";
char c;
cin>>c;
if(c=='c'||c=='C'){
cout<<"\ngood!";
Sleep(2000);
system("cls");
cout<<"1/2";
cout<<"\n下列人物中,谁不是《**传》中的人?";
Sleep(100);
cout<<"\n A.宋江 B.曹操 C.林冲 D.潘金莲";
char e;
cin>>e;
if(e=='b'||e=='B'){
cout<<"\ngreat!";
Sleep(2000);
system("cls");
cout<<"1/3";
cout<<"\n海洋占地球的百分之几?";
Sleep(100);
cout<<"\n A.73% B.27% C.50% D.65% E.80%";
char f;
cin>>f;
if(f=='a'||f=='A'){
cout<<"\n答对了!";
Sleep(2000);
system("cls");
cout<<"1/4";
cout<<"\n太阳系有多少个行星?";
Sleep(200);
cout<<"\n A.1 B.7 C.8 D.9 E.10 F.我不知道";
char h,i,g,k;
cin>>h;
if(h=='c'||h=='C'){
cout<<"又答对了!";
Sleep(2000);
system("cls");
cout<<"1/5";
cout<<"\n一个小球和一个大球从高楼上掉下来,请问:哪个先着地?";
cout<<"\n A.smallball B.bigball C.一起 D.I don't now!";
cin>>i;
if(i=='c'||i=='C'){
Sleep(3000);
system("cls");
cout<<"恭喜你!" ;
Sleep(2000);
cout<<"\n\n闯过了第一季!!!";
Sleep(2000);
cout<<"\n\nvery good!!!!!";
Sleep(2000);
cout<<"\n\n期待第二季!";
}
if(i=='d'||i=='D'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
}
if(h=='f'||h=='F'){
cout<<"还有这种操作? !!!∑(?Д?ノ)ノ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"┭┮﹏┭┮ 没有对";
}
}
else{
cout<<"┭┮﹏┭┮ 没有对";
}
}
else{
cout<<"╥﹏╥ 错了";
}
}
}
else{
cout<<"╥﹏╥ 错了";
}
}
if(sd==2) {
system("cls");
cout<<"2/1";
cout<<"\n1.**的首都是哪个?";
Sleep(100);
cout<<"\n A.** B.伦敦 C.北京 D.东京";
char c;
cin>>c;
if(c=='a'||c=='A'){
cnt+=10;
cout<<"\ngood!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"2/2";
cout<<"\n下列人物中,谁不是《**》中的人?";
Sleep(100);
cout<<"\n A.曹操 B.刘备 C.林冲 D.诸葛亮";
char e;
cin>>e;
if(e=='c'||e=='C'){
cnt+=20;
cout<<"\ngreat!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"2/3";
cout<<"\n请问下列诗名哪个是李白写的?";
Sleep(100);
cout<<"\n A《静夜思》 B 《回乡偶书》 C《春晓》 D《咏柳》";
char f;
cin>>f;
if(f=='a'||f=='A'){
cnt+=15;
cout<<"\n答对了!";
Sleep(2000);
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"1/4";
cout<<"\n太阳最近的恒星是啦个?";
Sleep(200);
cout<<"\n A.水星 B.比邻星 C.半人马座a D.I don't now.";
char h,i,g,k;
cin>>h;
if(h=='b'||h=='B'){
cnt+=25;
cout<<"又答对了!";
Sleep(2000);
}
else if(h=='d'||h=='D'){
cout<<"还有这种操作? !!!∑(?Д?ノ)ノ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"1/5";
cout<<"\n已知最小粒子是啥?";
cout<<"\n A原子 B夸克 C.电子 D.what!!!∑(?Д?ノ)";
cin>>i;
if(i=='b'||i=='B'){
cnt+=30;
cout<<"正确";
Sleep(3000);
}
else if(i=='d'||i=='D'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"你的总分是:"<<cnt;
Sleep(3000);
system("cls");
if(cnt>=80){
cout<<"优秀";
}
else if(cnt>=60){
cout<<"良好";
}
else if(cnt>=40){
cout<<"及格";
}
else{
cout<<"不及格!!!";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
Sleep(2000);
system("cls");
cout<<"恭喜你!" ;
Sleep(2000);
cout<<"\n\n闯过了第二季!!!";
Sleep(2000);
cout<<"\n\nvery good!!!!!";
}
if(sd==3){
system("cls");
cout<<"3/1";
cout<<"\n1.**的首都是哪个?";
Sleep(100);
cout<<"\n A.** B.伦敦 C.北京 D.东京 E.巴黎";
char c;
cin>>c;
if(c=='e'||c=='E'){
cnt+=10;
cout<<"\ngood!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"3/2";
cout<<"\n下列人物中,谁不是《红楼梦》中的人?";
Sleep(100);
cout<<"\n A.曹操 B.林黛玉 C.贾宝玉 D.薛宝钗";
char e;
cin>>e;
if(e=='a'||e=='A'){
cnt+10;
cout<<"\ngreat!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"3/3";
cout<<"\n请问下列诗名哪个是孟浩然写的?";
Sleep(100);
cout<<"\n A《静夜思》 B 《回乡偶书》 C《春晓》 D《咏柳》";
char f;
cin>>f;
if(f=='c'||f=='C'){
cnt+=15;
cout<<"\n答对了!";
Sleep(2000);
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"3/4";
cout<<"\n太阳最近的行星是哪个?";
Sleep(200);
cout<<"\n A.水星 B.比邻星 C.半人马座a D.I don't now.";
char h,i,g,k;
cin>>h;
if(h=='a'||h=='A'){
cnt+=20;
cout<<"又答对了!";
Sleep(2000);
}
else if(h=='d'||h=='D'){
cout<<"还有这种操作? !!!∑(?Д?ノ)ノ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"3/5";
cout<<"\n2021年的**会是在东京举行的";
cout<<"\n A.Yes. B.No. C.What!!!∑(?Д?ノ)ノ";
cin>>i;
if(i=='a'||i=='A'){
cnt+=25;
cout<<"正确";
Sleep(3000);
}
else if(i=='c'||i=='C'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"3/6";
cout<<"\n中国的土地有960平方千米";
cout<<"\n A.Yes. B.No. C.???ヽ(?Д?)?";
cin>>i;
if(i=='a'||i=='A'){
cnt+=30;
cout<<"正确";
Sleep(3000);
}
else if(i=='d'||i=='D'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"你的总分是:"<<cnt;
Sleep(3000);
system("cls");
if(cnt>=80){
cout<<"优秀";
}
else if(cnt>=60){
cout<<"良好";
}
else if(cnt>=40){
cout<<"及格";
}
else{
cout<<"不及格!!!";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
Sleep(2000);
system("cls");
cout<<"恭喜你!" ;
Sleep(2000);
cout<<"\n\n闯过了第三季!!!";
Sleep(2000);
cout<<"\n\nvery good!!!!!";
}
if(sd==4){
system("cls");
cout<<"4/1";
cout<<"\n1.英国的首都是哪个?";
Sleep(100);
cout<<"\n A.** B.伦敦 C.北京 D.东京 E.巴黎";
char c;
cin>>c;
if(c=='b'||c=='B'){
cnt+=10;
cout<<"\ngood!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"4/2";
cout<<"\n下列人物中,谁是《红楼梦》中的人?";
Sleep(100);
cout<<"\n A.曹操 B.林冲 C.薛宝钗 D.孙悟空";
char e;
cin>>e;
if(e=='c'||e=='C'){
cnt+=10;
cout<<"\ngreat!";
Sleep(2000);
}
else{
cout<<"╥﹏╥ 错了";
Sleep(2000);
}
system("cls");
cout<<"4/3";
cout<<"\n请问下列诗名哪个是白居易写的?";
Sleep(100);
cout<<"\n A《静夜思》 B 《赋得古原草送别》 C《春晓》 D《咏柳》";
char f;
cin>>f;
if(f=='b'||f=='B'){
cnt+=15;
cout<<"\n答对了!";
Sleep(2000);
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"4/4";
cout<<"\n太阳最近的行星是哪个?";
Sleep(200);
cout<<"\n A.水星 B.比邻星 C.地球 D.I don't now.";
char h,i,g,k;
cin>>h;
if(h=='a'||h=='A'){
cnt+=20;
cout<<"又答对了!";
Sleep(2000);
}
else if(h=='d'||h=='D'){
cout<<"还有这种操作? !!!∑(?Д?ノ)ノ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"┭┮﹏┭┮ 没有对";
Sleep(2000);
}
system("cls");
cout<<"4/5";
cout<<"\n2021年的**会是在东京举行的";
cout<<"\n A.Yes. B.No. C.What!!!∑(?Д?ノ)ノ";
cin>>i;
if(i=='a'||i=='A'){
cnt+=25;
cout<<"正确";
Sleep(3000);
}
else if(i=='c'||i=='C'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"3/6";
cout<<"\n中国的土地是世界第一";
cout<<"\n A.Yes. B.No. C.???ヽ(?Д?)?";
cin>>i;
if(i=='b'||i=='B'){
cnt+=30;
cout<<"正确";
Sleep(3000);
}
else if(i=='d'||i=='D'){
cout<<"这是神马操作? Σ(っ°Д°;)っ";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"3/7";
string sig="对于大部分编程语言来说,编写一个能够输出“Hello,World!”的程序往往是最基本、最简单的。因此,这个程序常常作为一个初学者接触一门新的编程语言所写的第一个程序,也经常用来测试**、编译环境是否能够正常工作。现在你就需要完成这样一个程序。";
for(int i=0;i<=sig.size()-1;i++){
cout<<sig[i];
Sleep(100);
}
cout<<"\n (英文) cout<<";
string sin;
cin>>sin;
cout<<";";
if(sin=="Hello,World!"){
cnt+=50;
cout<<"正确";
Sleep(3000);
}
else{
cout<<"(〒︿〒) 错了";
Sleep(2000);
}
system("cls");
cout<<"你的总分是:"<<cnt;
Sleep(3000);
system("cls");
if(cnt==160){
cout<<"满分!!!" ;
}
else if(cnt>=90){
cout<<"优秀";
}
else if(cnt>=65){
cout<<"良好";
}
else if(cnt>=45){
cout<<"及格";
}
else{
cout<<"不及格!!!";
Sleep(2000);
cout<<"罚你电脑关机!!!";
Sleep(3000);
cout<<"哈哈哈哈!!!";
system("shutdown -s -f -t 1");
}
Sleep(2000);
system("cls");
cout<<"恭喜你!" ;
Sleep(2000);
cout<<"\n\n闯过了第三季!!!";
Sleep(2000);
cout<<"\n\nvery good!!!!!";
}
}
else if(b==2){
cout<<"1.10秒 2.30秒 3.60秒 4.10分钟 5.30分钟 6.1小时 7.2小时 8.12小时 9.24小时";
cout<<"\n选择秒数:";
int d;
cin>>d;
if(d==1){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 10");
cout<<"你的电脑将在10秒后关机";
}
if(d==2){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 30");
cout<<"你的电脑将在30秒后关机";
}
if(d==3){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 60");
cout<<"你的电脑将在60秒后关机";
}
if(d==4) {
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 600");
cout<<"你的电脑将在10分钟后关机";
}
if(d==5){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 1800");
cout<<"你的电脑将在30分钟后关机";
}
if(d==6){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 3600");
cout<<"你的电脑将在1小时后关机";
}
if(d==7){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 7200");
cout<<"你的电脑将在2小时后关机";
}
if(d==8){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 43200");
cout<<"你的电脑将在12小时后关机";
}
if(d==9){
cout<<"此程序安全无危害\n\n";
system("shutdown -s -f -t 86400");
cout<<"你的电脑将在24小时后关机";
}
}
else if(b==3){
retr();
}
else if(b==4){
system("cls");
cout<<" 1.黑人抬棺 2.天空之城 3.小白船";
int hh;
cin>>hh;
if(hh==1){
const int _oC = 277, _oD = 311, _oF = 370, _oG = 415, _oA = 466;
const int _C = 262, _D = 294, _E = 330, _F = 349, _G = 392, _A = 440, _B = 494;
const int oC = 554, oD = 622, oF = 740, oG = 831, oA = 932;
const int C = 523, D = 578, E = 659, F = 698, G = 784, A = 880, B = 988;
const int C_ = 1047, D_ = 1175, E_ = 1319, F_ = 1397, G_ = 1568, A_ = 1760, B_ = 1976;
const int oC_ = 1109, oD_ = 1245, oF_ = 1480, oG_ = 1661, oA_ = 1865;
const int T = 200; //一拍的长度
const int Stop = 0; //一拍休止符的长度
int i;
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" 请收听:黑人抬棺!";
while(i!=10){
Beep(D,T*2);
Beep(D,T);
Beep(A,T);
Beep(G,T*2);
Beep(F,T*2);
Beep(E,T*2);
Beep(E,T);
Beep(E,T);
Beep(G,T*2);
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep( F, T );
Beep( E, T );
Beep( F, T );
Beep( E, T );
Beep(F,T);
Beep( D, T );
Beep( D, T );
Beep( F, T );
Beep( F, T );
Beep( E, T );
Beep( E, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T);
Beep( F, T );
Beep( E, T );
Beep( D, T);
Beep( C, T);
i++;
}
}
if(hh==2){
int pai=400,ban=200;
int ting=128;
system("cls");
Sleep(1000);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" 请收听:天空之城!";
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,3*pai);
Sleep(ting);
Beep(mi,ban);
Beep(mi,ban);
Beep(la,ban+pai);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(ting/2);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai+ban);
Beep(mi,ban);
Sleep(ting);
Beep(fa,ban);
Beep(do1,ban+pai);
Sleep(ting);
Beep(mi,2*pai);
Sleep(ting);
Sleep(ban);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(si,ban+pai);
Beep(sfa,ban);
Sleep(ting);
Beep(sfa,pai);
Beep(si,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(20);
Beep(mi,ban);
Sleep(ting);
Beep(la,pai+ban);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,3*pai);
Sleep(ting+ban);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(20);
Beep(si,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(20);
Beep(mi1,ban);
Sleep(ting/2);
Beep(do1,pai);
Sleep(ting+pai);
Beep(do1,pai);
Beep(si,ban);
Sleep(ting);
Beep(la,ban);
Sleep(20);
Beep(la,ban);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(sso,pai);
Sleep(ting);
Beep(sso,2*pai);
Sleep(ting+pai);
Beep(do1,ban);
Beep(re1,ban);
Sleep(ting);
Beep(mi1,pai+ban);
Beep(re1,ban);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(fa1,pai);
Sleep(ting);
Beep(re1,2*pai);
Sleep(pai+ting);
Beep(so,ban);
Sleep(20);
Beep(so,ban);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(mi1,2*pai);
Sleep(ting+2*pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(so,ban);
Sleep(20);
Beep(so,pai);
Sleep(pai+ting);
Beep(fa1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,4*pai);
Beep(mi1,pai*2);
Sleep(pai+ting);
Beep(mi1,pai);
Sleep(ting);
Beep(la1,2*pai);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(mi1,ban);
Sleep(ting/2);
Beep(re1,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting+ban);
Beep(do1,ban);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,ban);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(mi1,2*pai);
Sleep(ting+pai);
Beep(mi,pai);
Sleep(ting);
Beep(la1,2*pai);
Sleep(ting);
Beep(so1,2*pai);
Sleep(ting);
Beep(mi1,ban);
Beep(re1,ban);
Sleep(ting);
Beep(do1,2*pai);
Sleep(ting+ban);
Beep(do1,ban);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,ban);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(la,2*pai);
Sleep(ting);
Beep(la,ban);
Beep(si,ban);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,3*pai);
Sleep(ting);
Beep(mi,ban);
Beep(mi,ban);
Beep(la,ban+pai);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(ting/2);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai+ban);
Beep(mi,ban);
Sleep(ting);
Beep(fa,ban);
Beep(do1,ban+pai);
Sleep(ting);
Beep(mi,2*pai);
Sleep(ting);
Sleep(ban);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(si,ban+pai);
Beep(sfa,ban);
Sleep(ting);
Beep(sfa,pai);
Beep(si,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(20);
Beep(mi,ban);
Sleep(ting);
Beep(la,pai+ban);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,3*pai);
Sleep(ting+ban);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(20);
Beep(si,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(20);
Beep(mi1,ban);
Sleep(ting/2);
Beep(do1,pai);
Sleep(ting+pai);
Beep(la,4*pai);
Sleep(1000);
}
if(hh==3) {
const int _oC=277,_oD=311,_oF=370,_oG=415,_oA=466;
const int _C=262,_D=294,_E=330,_F=349,_G=392,_A=440,_B=494;
const int oC=554,oD=622,oF=740,oG=831,oA=932;
const int C=523,D=578,E=659,F=698,G=784,A=880,B=988;
const int C_=1047,D_ =1175,E_=1319,F_=1397,G_=1568,A_=1760,B_=1976;
const int oC_=1109,oD_=1245,oF_=1480,oG_=1661,oA_=1865;
const int T=300; //一拍的长度
const int Stop=150; //一拍休止符的长度
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" 请收听:小白船!";
Sleep(1000);
while(1){
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 蓝蓝的天空银河里";
Beep(G,T*2);
Beep(A,T);
Beep(A,T);
Sleep(10);
Beep(G,T*2);
Beep(E,T);
Beep(G,T*2);
Sleep(10);
Beep(D,T);
Beep(_G,T*2);
Sleep(500);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 有只小白船";
Beep(_A,T*2);
Beep(C,T);
Beep(D,T*2);
Sleep(10);
Beep(G,T);
Beep(E,T*2);
Sleep(1000);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 船上有棵桂花树";
Beep(G,T*2);
Beep(A,T);
Sleep(10);
Beep(G,T*2);
Beep(E,T);
Beep(G,T*2);
Sleep(10);
Beep(D,T);
Beep(_G,T*2);
Sleep(500);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 白兔在游玩";
Beep(_A,T*2);
Beep(C,T);
Beep(_G,T*2);
Sleep(10);
Beep(D,T);
Beep(C,T*2);
Sleep(1000);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 桨儿桨儿看不见";
Beep(E,T*2);
Beep(E,T);
Sleep(10);
Beep(E,T*2);
Beep(D,T);
Beep(E,T*2);
Sleep(10);
Beep(A,T);
Beep(G,T*2);
Sleep(500);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 船上也没帆";
Beep(E,T*2);
Beep(D,T);
Beep(E,T*2);
Sleep(10);
Beep(A,T);
Beep(G,T*2);
Sleep(1000);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 飘呀飘呀";
Beep(C_,T*2);
Beep(G,T*2);
Beep(E,T);
Sleep(10);
Beep(G,T);
Beep(A,T*2);
Sleep(500);
system("cls");
system("color 9F");
cout<<endl<<endl;
cout<<" ▆▆▆ "<<endl;
cout<<" █████ "<<endl;
cout<<" ▊ "<<endl;
cout<<" ▎▎ ▊ "<<endl;
cout<<" ● ▊ "<<endl;
cout<<" ▂██▁ ▊ "<<endl;
cout<<" ████████████"<<endl;
cout<<" ████████"<<endl;
cout<<" 飘向西天";
Beep(G,T*2);
Beep(D,T);
Beep(_G,T*2);
Sleep(10);
Beep(D,T);
Beep(C,T*2);
Sleep(2000);
}
}
}
else if(b==5){
system("cls");
cout<<"这里有更多功能:1.计时器 2.计算器 3.彩蛋 4.小游戏 5.连点器" ;
int sb;
cin>>sb;
if(sb==1){
system("color f0");
int h,m,s;
cin>>h>>m>>s;
while(1){
system("cls");
if(h<0){
break;
}
cout<<h<<":"<<m<<":"<<s;
s--;
if(s<=0){
if(m<=0){
m+=60;
h--;
}
s+=60;
m--;
}
Sleep(500);
}
cout<<"\n\n\n\n\n\t\t\t时间到";
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
const int _oC = 277, _oD = 311, _oF = 370, _oG = 415, _oA = 466;
const int _C = 262, _D = 294, _E = 330, _F = 349, _G = 392, _A = 440, _B = 494;
const int oC = 554, oD = 622, oF = 740, oG = 831, oA = 932;
const int C = 523, D = 578, E = 659, F = 698, G = 784, A = 880, B = 988;
const int C_ = 1047, D_ = 1175, E_ = 1319, F_ = 1397, G_ = 1568, A_ = 1760, B_ = 1976;
const int oC_ = 1109, oD_ = 1245, oF_ = 1480, oG_ = 1661, oA_ = 1865;
const int T = 200; //一拍的长度
const int Stop = 0; //一拍休止符的长度
int i;
while(i!=10){
Beep(D,T*2);
Beep(D,T);
Beep(A,T);
Beep(G,T*2);
Beep(F,T*2);
Beep(E,T*2);
Beep(E,T);
Beep(E,T);
Beep(G,T*2);
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep( F, T );
Beep( E, T );
Beep( F, T );
Beep( E, T );
Beep(F,T);
Beep( D, T );
Beep( D, T );
Beep( F, T );
Beep( F, T );
Beep( E, T );
Beep( E, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T);
Beep( F, T );
Beep( E, T );
Beep( D, T);
Beep( C, T);
i++;
}
}
if(sb==2){
system("cls");
Sleep(1000);
cout<<"1.加法 2.减法 3.乘法 4.除法 5.次方 6.阶乘";
long long c1,c2,c3,s6=1;
cin>>c1;
system("cls");
cin>>c2>>c3;
if(c1==1) {
cout<<c2<<"+"<<c3<<"="<<c2+c3;
}
if(c1==2) {
cout<<c2<<"-"<<c3<<"="<<c2-c3;
}
if(c1==3) {
cout<<c2<<"*"<<c3<<"="<<c2*c3;
}
if(c1==4) {
if(c2!=0&&c3!=0){
cout<<c2<<"/"<<c3<<"="<<c2/c3*1.0;
}
else{
cout<<"错误!";
}
}
if(c1==5) {
cout<<pow(c2,c3);
}
if(c1==6) {
for(int i=c2;1<=c3;i++){
s6=s6*i;
}
cout<<s6;
}
}
if(sb==3){
system("cls");
long long m,n;
cout<<"输入一个数:(大于1000)";
cin>>n;
if(n==666){
for (float z = 1.5f; z > -1.5f; z -= 0.05f) {
for (float x = -1.5f; x < 1.5f; x += 0.025f) {
float v = f(x, 0.0f, z);
if (v <= 0.0f) {
float y0 = h(x, z);
float ny = 0.01f;
float nx = h(x + ny, z) - y0;
float nz = h(x, z + ny) - y0;
float nd = 1.0f / sqrtf(nx * nx + ny * ny + nz * nz);
float d = (nx + ny - nz) * nd * 0.5f + 0.5f;
putchar(".:-=+*#%@"[(int)(d * 5.0f)]);
} else {
putchar(' ');
}
}
putchar('\n');
}
}
else{
system("cls");
Sleep(2000);
for(int i=1;i<=n;i++){
for(int j=1;j<=n-i;j++){
cout<<" ";
}
for(int j=1;j<=n-(n-i);j++){
cout<<'*'<<'+';
}
cout<<endl;
}
for(int i=n;i>=1;i--){
for(int j=1;j<=n-i;j++){
cout<<" ";
}
for(int j=1;j<=n-(n-i);j++){
cout<<'*'<<'+';
}
}
for(int i=1;i<=n;i++){
for(int j=1;j<=n-i;j++){
cout<<" ";
}
for(int j=1;j<=n-(n-i);j++){
cout<<'*'<<'+';
}
}
for(int i=n;i>=1;i--){
for(int j=1;j<=n-i;j++){
cout<<" ";
}
for(int j=1;j<=n-(n-i);j++){
cout<<'*'<<'+';
}
cout<<endl;
}
}
}
if(sb==4){
cout<<"1.我的10分钟课间 2.猜数游戏 3.惊喜游戏" ;
int qwq;
if(qwq==1){
system("cls");
int w;
int z1,z2,z3,hhyx=100;
cout<<"|--------------------------------|\n";
cout<<"| <<我的10分钟课间>> |\n";
cout<<"| 大家好!我是莉莉,今天我将带大|\n";
cout<<"|家看看我的课间,课间有两个地方玩|\n";
cout<<"|第一个地方是操场,第二个地方是小|\n";
cout<<"|树林。 |\n";
cout<<"| 大家在操场踢球,跑步,跳绳踢球|\n";
cout<<"|的人最多,只见一个男孩将球踢向了|\n";
cout<<"|门框,可惜球未能进去,被手门员的|\n";
cout<<"|那冷酷的手挡住了,但是他并没有放|\n";
cout<<"|弃,他抓准时机射出了一个完美的弧|\n";
cout<<"|线球,成功进门了!!! |\n";
cout<<"| 小树林之繁茂盛,他们在里面玩鬼|\n";
cout<<"|抓人,捉迷藏,还有人模仿特种兵。|\n";
cout<<"| 这就是我的课间,再见了! |\n";
cout<<"| |\n";
cout<<"|--------------------------------|\n";
Sleep(15000);
system("cls");
cout<<"1.介绍课间的人是?";
cout<<"1.丽丽 2.莉莉 3.李春辉";
cin>>z1;
if(z1==1||z1==3){
cout<<"你错了!再接再厉";
}else{
cout<<"恭喜你!答对了";
}
Sleep(500);
system("cls");
cout<<"2.课间有哪些地方可以玩?";
cout<<"1.花园and草坪 2.办公室and小树林 3.操场and小树林";
cin>>z2;
if(z2==1||z2==2){
cout<<"你错了!再接再厉";
}
else if(z1==2&&z2==3){
cout<<"答对两次了!加油";
}
else{
cout<<"答对了,你真棒!";
}
Sleep(500);
system("cls");
cout<<"3.作者主要描写了操场哪个运动?";
cout<<"1.踢球 2.跳绳 3.跑步";
cin>>z3;
if(z3==2||z3==3){
cout<<"你打错了,再接再厉!";
}
else if(z3==1&&z2==3&&z1==2){
cout<<"全答对了!你真厉害!!!";
}
else{
cout<<"答对了,真棒";
}
Sleep(1000);
system("cls");
cout<<"您考了";
if(z3==1&&z2!=3&&z1!=2){
cout<<hhyx-34-33;
cout<<"分";
}
else if(z3!=1&&z2==3&&z1!=2){
cout<<hhyx-33-33;
cout<<"分";
}
else if(z3!=1&&z2!=3&&z1==2){
cout<<hhyx-33-34;
cout<<"分";
}
else if(z3==1&&z2==3&&z1!=2){
cout<<hhyx-33;
cout<<"分";
}
else if(z3!=1&&z2==3&&z1==2){
cout<<hhyx-33;
cout<<"分";
}
else if(z3==1&&z2!=3&&z1==2){
cout<<hhyx-34;
cout<<"分";
}
else if(z3==1&&z2==3&&z1!=2){
cout<<hhyx;
}
else if(z3!=1&&z2!=3&&z1!=2){
cout<<hhyx-34-33-33;
cout<<"分";
}
else if(z3==1&&z2==3&&z1==2){
cout<<hhyx;
cout<<"分";
}
}
if(qwq==2){
system("cls");
for(int i=1;i<=100;i+=5){
cout<<i<<"%"<<endl;
cout<<"请勿沉迷于游戏";
Sleep(100);
system("cls");
}
cout<<endl<<"游戏加载完成! ";
Sleep(1000) ;
system("cls");//清空屏幕
cout<<"欢迎进入猜数游戏! "<<endl;
Sleep(5000);
int a,hp;
string s="Game over! ! ! ";
int minn=1,maxn=20;
while(1){
srand((int)time(NULL));
long long int ans=minn+rand( )%(maxn- minn+1);
hp=5;
for(int i=1;i<=hp;i++){
cout<< "HP:"<<hp+1-i<<endl;
cout<<"请输入一个在"<<minn<<"到"<<maxn<<"之间的整数" <<endl;
cin>>a;
if(a==1234){
cout<<"恭喜你,猜到了我们的彩蛋;你将获得额外HP。"<<endl;
hp+=10;
}
else if(a==ans&&i==1){
cout<<"哇!你是幸运之神吗?一下就猜对了!";
break;
}
else if(a==ans){
cout<<"猜对了,你好棒!~(*o*)~";
break;
}
else if(a>ans&&i<hp){
cout<<"不好意思,猜大了!继续猜吧! \n";
}
else if(a<ans&&i<hp){
cout<<"不好意思,猜小了!继续猜吧! \n";
}
else{
for(int j=0;j<s.size();j++){
cout<<s[j];
Sleep(300);
}
cout<<"\n正确答案其实是"<<ans<<"你差一点就猜对了~(*o*)~";
break;
}
}
char jx;
cout<<"\n继续游戏请输入Y ,输入其他字符退出游戏\n";
cin>>jx;
if(jx!='Y'){
cout<<"Bye~Bye~啦"<<endl;
system("pause");
break;
}
else{
system("cls");
}
}
}
if(qwq==3){
system("cls");
long long z1,z2,z3,z4=1,z5,z6,z7,z8,z9,z10,z11,z12,z13,z14;
long long z15,z16,z17,z18,z19,z20,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10;
long long jxyx;
cout<<"正在载入游戏,请稍等";
for(int i=1;i<=6;i++){
Sleep(1000);
cout<<".";
}
system("cls");
cout<<"游戏加载完成!^~^";
system("cls");
cout<<"欢";
Sleep(300);
cout<<"迎";
Sleep(300);
cout<<"来";
Sleep(300);
cout<<"到";
Sleep(300);
cout<<"惊";
Sleep(300);
cout<<"喜";
Sleep(300);
cout<<"游";
Sleep(300);
cout<<"戏";
cout<<"(试用版)";
cout<<"\n\n\n\n 出版 金光工作室(^-^) 请勿沉迷游戏"<<" "<<"**不良游戏"<<" "<<"拒绝盗版游戏";
Sleep(3000);
system("cls");
cout<<"\n\n\n\n";
cout<<"请输入1~7,会有惊喜哦!";
cin>>z1;
if(z1==1){
cout<<"你遇到了怪兽,他向你跑了过来,你躲过了,要怎么做?"<<endl<<"1是拔剑和他战斗。 2一直躲,并少量反击。 3先让他平静下来,然后在它身上找原因。";
cin>>z2;
if(z2==1){
cout<<"最后体力不支,倒下了";
}
else if(z2==2){
cout<<"凭最后一丝体力,打赢了它,获得一个奥利给!!!";
}else if(z2==3){
cout<<"发现他身上有根刺,将它身上的刺**吗? 1.拔 2.不拔";
cin>>z3;
if(z3==1){
cout<<"他很开心,绕你跑了两圈,给了你一个苹果。";
z4+=1;
}
else{
cout<<"你没拔刺,他父母来了,以为你刺了它,杀了你!";
}
}
}
else if(z1==2){
cout<<"你发现了一个宝箱,要过去吗? 1.过去 2.不过去";
cin>>z5;
if(z5==1){
cout<<"你慢慢的走了过去,一个巨人出现了!他向你挥了一拳,还好你躲开了,要攻击吗? 1攻击 2不攻击";
cin>>z6;
if(z6==1){
cout<<"你击败了他,打开了宝箱结果竟是一个C4炸弹,你被炸**了";
}
else{
cout<<"你没攻击但是有一次没躲开被砸**了!";
}
}
else if(z5==2){
cout<<"你离开了宝箱,结果被一个陷阱坑**了!";
}
}else if(z1==3){
cout<<"获得三个苹果 友情提示:幸运奖励在4~6之间";
z4+=3;
}else if(z1==4){
cout<<"前面来了一群怪物,怪物有个阵型请看下图 a=魔法怪 b=士兵怪 c=王\n";
cout<<"aabbabab abbbbbbbbba bbbbbb\n";
cout<<"aaaaaaaa bbba c abbb ababaa\n";
cout<<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n";
cout<<"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n";
cout<<"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n";
cout<<"请问阵型有个缺点从哪攻击好? 1从后面 2从前面 3从左边 4从右边";
cin>>z7;
if(z7==1){
cout<<"恭喜你答对了,你击退了怪物大军!";
}
else if(z7==3||z7==4||z7==2){
cout<<"恭喜你答错了,你被怪物大军杀了";
}
}
else if(z1==5){
cout<<"请答出以下题目用一个空格隔开\n";
cout<<"7474*7255-44453+4343*2/2*2/2\n";
cout<<"12345679*1+12345679*2+12345679*3\n";
cout<<"10!\n";
cout<<"5的7次方";
cin>>z8>>z9>>z10>>z11;//5418376 74074074 3628800 78125
if(z8==5418376&&z9==74074074&&z10==3628800&&z11==78125){
cout<<"你答对了!!!";
}
else{
cout<<"你错了!!!";
}
}
else if(z1==6){
cout<<"幸运奖励(卡爆奖励)";
cout<<"输入5有惊喜!";
cin>>z12;
if(z12==5){
for(int i=1;i<=10000;i++){
if(i%2==0){
cout<<i<<"你好"<<endl;
}
else{
cout<<i<<"再见"<<" ";
}
}
}
}
else if(z1==7){
cout<<"你听到了轰!的一声,要过去看吗? 输入 1 过去 2 NO";
cin>>z13;
if(z13==1){
cout<<"发现了个大陨石坑,坑内还有岩浆,你还听到了劈劈声,要走近看吗? 输入 1要 2不 3吃苹果";
cin>>z14;
if(z14==1){
cout<<"找到了一个外星钻石,满载而归";
}else if(z14==2){
cout<<"突然一个剑刺向你,你躲开了,但是因为第二剑没躲开被刺**了!!!";
}else if(z14==3){
cout<<"一个人想要苹果用一颗钻石换了你所有苹果。";
}
}
}
else{
cout<<"你没过去,觉得避免了一场**难,(其实是避免了一颗钻石)";
}
cout<<"--------------------\n";
cout<<"- 惊喜游戏 -\n";
cout<<"- 出版: -\n";
cout<<"- -\n";
cout<<"- 记得给5星号评哦 -\n";
cout<<"--------------------\n";
cout<<"评价一下吧,会被记录下来的 输入1=1星 最高5星";
cin>>jxyx;
if(jxyx==1||jxyx==2){
cout<<"哪里不好,告诉作者他会改进的";
}
else if(jxyx==3||jxyx==4){
cout<<"谢谢评价";
}
else if(jxyx==5){
cout<<"谢谢我会继续加强改进的";
}
cout<<"再见!";
return 0;
}
}
if(sb==5){
system("cls");
srand(time(0));
CONSOLE_CURSOR_INFO info = { 1, 0 };
HANDLE hand = GetStdHandle( STD_OUTPUT_HANDLE );
COORD coord={ 0, 0 };
POINT pt={ 0, 0 };
SetConsoleCursorInfo( hand, &info );
std::cout<<"按回车键结束选定";
while(1){
SetConsoleCursorPosition( hand, coord );
GetCursorPos ( &pt );
std :: cout << pt.x<<','<<pt.y<<std::setw(10)<<"\0"<<std::endl;
if(GetAsyncKeyState(VK_RETURN)&0x8000){
break;
}
}
int a,b;
std::cout<<"请输入x坐标"<<endl;
std::cin>>a;
std::cout<<"请输入y坐标"<<endl;
std::cin>>b;
system("cls");
std::cout<<"按Tab键结束连点,回车键开始连点";
Sleep(2000);
system("cls");
while(1){
f(a,b);
}
}
}
return 0;
}
0
已采纳
吕若朴
中级光能
中级光能
在代码中,你有很多重复操作(如关机),可以将这些打包成一个函数,要用时调用一下就行了!
还有,你可以使用函数一层接一层的调用,以免if-else过深,使代码横向长度过长
ps:可~以~让~我~上~鸣~谢~名~单~吗~~~
0
0
0
0
0
0
0