Ok so I have a C++ project due tomorrow and I am stuck. I am also a completely new to C++ and programming in general so if you can tell me the necessary code and where to put it it would help ALOT.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{ int i;
i = 1;
cout << "Wanna test how smart you are? \n";
cout << "ThEn LeT's PlAy ThE sMaRt GaMe! \n";
cout << "What's "<<i<<"*"<<i<<"? \n";
int guess;
cin >> guess;
int num;
num = (i+1)*(i+1);
if (guess == num);
cout << "WoW! i NeVeR tHoUgHt YoU wErE sO sMaRt! \n";
cout << "TIME FOR LEVEL "<<i<< " ! \n";
cin.get()
return 0}
I am using the basic header files with Visual Studio '10. Basically, what I want this program to do is play this code but i want it to have a loop that adds 1 to integer i after every time it loops (it will loop continuously). I also want an else if statement that will send the player back to level one and resets the integer i back to 1, and repeat the process. Any help will be greatly appreciated.
Bookmarks