tooltiperror
Super Moderator
- Reaction score
- 231
Code:
#include <iostream>
using namespace std;
int main()
{
int thisisanumber;
int x = 0;
for (x=0;thisisanumber!=3;x++)
{
cout<<"Enter a guess: ";
cin>> thisisanumber;
if (thisisanumber<3)
{
cout<<"Your guess is too low. \n";
}
else if (thisisanumber>3){
cout<<"Your guess is to high. \n";
}
}
cout<<"You have won! \n";
cin.get();
}
This code, obviously, asks for a random number, well not random, and then tells you if it was lower or higher, untill you guess it.
1) How do I get a random number? Whenever I try to use stuff, it doesn't work.
2) How do I make a GUI for this? Like a window with a text box and maybe a number line to choose from.
3) How do I change it into a .app?