先点击左上方的“文件”,再点击“新建”,接着点击“项目”,就会有下面的样子:

再选Console,就会出现下面的样子:

接着选Jackpot,再点确定,C++就会打开一个mian,这时你运行就是了。
游戏意思:输入一个数字,杰克会告诉你太大了或太小了,直到猜中或次数用完。
懒的人可以复制下面的代码:
#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'

最低0.47元/天 解锁文章
1万+






