0
已解决
黄中阳
初级光能
初级光能
超快的更新速度!!
2.0来啦!
加入了等级(11个),具体看代码
加入了闪币
加入了经验值
加入了查看次数
改善了回答的BUG
关于存档的事吗……先拖一拖
#include<bits/stdc++.h>
#include<windows.h>
#ifndef _WINDOWS_
#define _WINDOWS_
#include <_mingw.h>
#include <sdkddkver.h>
#ifdef __OBJC__
#pragma push_macro("interface")
#undef interface
#define interface struct
#endif
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#if defined(RC_INVOKED) && !defined(NOWINRES)
#include <winresrc.h>
#else
#ifdef RC_INVOKED
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif
#if defined(__x86_64) && \
!(defined(_X86_) || defined(__i386__) || defined(_IA64_))
#if !defined(_AMD64_)
#define _AMD64_
#endif
#endif
#if defined(__ia64__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_))
#if !defined(_IA64_)
#define _IA64_
#endif
#endif
#ifndef RC_INVOKED
#include <excpt.h>
#include <stdarg.h>
#endif
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <winnls.h>
#include <wincon.h>
#include <winver.h>
#include <winreg.h>
#include <winnetwk.h>
#include <virtdisk.h>
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#include <shellapi.h>
#include <winperf.h>
#if defined(__USE_W32_SOCKETS) || !defined(__CYGWIN__)
#include <winsock.h>
#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#include <winefs.h>
#include <winscard.h>
#endif
#ifndef NOUSER
#ifndef NOGDI
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif
#include <commdlg.h>
#endif
#endif
#endif
#ifndef __CYGWIN__
#include <stralign.h>
#endif
#ifdef INC_OLE2
#include <ole2.h>
#endif
#ifndef NOSERVICE
#include <winsvc.h>
#endif
#ifndef NOMCX
#include <mcx.h>
#endif
#ifndef NOIME
#include <imm.h>
#endif
#endif
#endif
#ifdef __OBJC__
#pragma pop_macro("interface")
#endif
#endif
#include<conio.h>
#include<iomanip>
using namespace std;
bool qiandao;
int dao=20,douzi,jingyan;
int hui[1000],chakan[1000];
string nei[1000],biao[1000],name;
int cnt;
void Ti(){
SetConsoleTitle("闪耀问答2.0");
}
int main(){
Ti();
cout<<"\t\t 这里是闪耀问答\n";
cout<<"\t\tThis is the Lightning Wenda\n";
Sleep(3000);
cout<<"\t\t 若要此代码版权,请联系我们\n";
Sleep(3000);
system("cls");
for(int i=1;i<=10;i++){
cout<<"正在加载中";
cout<<".";
Sleep(100);
cout<<".";
Sleep(100);
cout<<".";
Sleep(100);
system("cls");
}
system("cls");
cout<<"尊姓大名:";
getline(cin,name);
while(1){
system("cls");
cout<<"User name:"<<name<<endl;
cout<<"_______________\n";
cout<<"|我的闪币:"<<douzi<<"|\n";
cout<<"______________\n";
cout<<"|经验值:"<<jingyan<<"|\n";
cout<<"________________\n";
cout<<"|我的等级:";
if(jingyan<=10){
cout<<"修炼者";
}
else if(jingyan<=15){
cout<<"初级守护";
}
else if(jingyan<=22){
cout<<"暴级守护";
}
else if(jingyan<=30){
cout<<"初级光能";
}
else if(jingyan<=40){
cout<<"究极光能";
}
else if(jingyan<=50){
cout<<"初级启示者";
}
else if(jingyan<=60){
cout<<"神灵启示者";
}
else if(jingyan<=66){
cout<<"能量之神";
}
else if(jingyan<=70){
cout<<"光明缔造者";
}
else if(jingyan<=76){
cout<<"巅峰缔造者";
}
else if(jingyan<=85){
cout<<"缔造者守护神";
}
cout<<"|\n";
cout<<"________________\n";
cout<<"0.酷町堂 1.我要提问 2.水闪币 ";
if(!qiandao) cout<<"3.签到";
cout<<"\n\n";
for(int i=1;i<=cnt;i++){
cout<<"贴"<<i<<" |"<<biao[i]<<"| "<<"打开扣"<<i+3<<" 查看:"<<chakan[i]<<"次"<<endl;
}
char c;
c=getch();
if(c=='0'){
system("start https://ke.codingtang.com/");
}
if(c>='4'){
chakan[c-'0'-3]++;
int shu=c-'0'-3;
system("cls");
cout<<biao[shu]<<endl;
cout<<"____________________________________\n";
for(int i=0;i<nei[shu].size();i++){
if(nei[shu][i]=='$') cout<<endl;
else cout<<nei[shu][i];
}
cout<<"\n\n\n0键退出 1键回答\n";
char z;
z=getch();
if(z=='1'){
string cmp="";
cout<<"回答内容:\n";
getchar();
getline(cin,cmp);
hui[shu]++;
nei[shu]+="$$$回答";
nei[shu]+=(hui[shu]+'0');
nei[shu]+="$ ";
nei[shu]+=cmp;
nei[shu]+="$$";
system("cls");
cout<<"\n\t\t回答成功!";
jingyan+=2;
Sleep(1000);
}
continue;
}
if(c=='2'){
system("cls");
int minn=1,maxn=5;
srand((int)time(NULL));
int a=minn+rand()%(maxn-minn+1);
cout<<"水到了"<<a<<"个闪币\n";
douzi+=a;
jingyan++;
Sleep(3000);
}
if(c=='3'){
system("cls");
if(qiandao){
cout<<"您已经签过了哦!";
Sleep(2000);
continue;
}
else{
int minn=1,maxn=dao;
srand((int)time(NULL));
int a=minn+rand()%(maxn-minn+1);
dao+=2;
douzi+=a;
qiandao=1;
cout<<"恭喜获得"<<a<<"个闪币";
Sleep(2000);
continue;
}
}
else if(c=='1'){
while(1){
system("cls");
int xuan=0;
string timu,neirong;
cout<<"悬赏金额:";
cin>>xuan;
cout<<"\n题目:";
getline(cin,timu);
getline(cin,timu);
cout<<"\n内容(换行用$表示):\n";
getline(cin,neirong);
cout<<"\n是否发布: 是:1 否:0\n";
int x;
cin>>x;
if(x==1){
if(xuan<10){
MessageBox(NULL,"悬赏金额不能低于10","提示",MB_OK);
continue;
}
else if(xuan>douzi){
MessageBox(NULL,"闪币不够","提示",MB_OK);
continue;
}
cout<<"发布成功!";
douzi-=xuan;
jingyan+=6;
cnt++;
nei[cnt]=neirong;
biao[cnt]=timu;
Sleep(1000);
break;
}
else break;
}
continue;
}
}
return 0;
}
采纳第一个在里面到达缔造者守护神等级的同学
0
0
0
0
0
0
0
0
0