Hello, i have a couple questions. im making a simple program were the user has to guess a number. One of my problems is that ounce they enter a number, they have to restart the program to guess again because it will quit if they guess it after the first time. What would i use to make it so after they guess one time it restarts itself at a certain point. heres my code. Also what does BOOL mean? Thx
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int number;
cout<<"Find the lucky number, made by d3|dr!cK, pick a number 1-3"<<endl;
cin>>number;
cin.ignore();
if ( number == 1)
{
cout<<"#1, good choice but,not a cool number, pic another number...";
}
if ( number == 3)
{
cout<<"#3, pic another number...";
}
if ( number == 2)
{
cout<<"#2, Good job";
}
if (number > 3)
{
cout<< " Enter a number beetween one and five";
}
cin.get();
}