Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
May 21, 2013, 9:01 p.m.
FORMAT:
Text only
SIZE:
737 Bytes
Raw
Download
Tweet
HITS:
978
Go to comments
Report
#include "stdafx.h"
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
int count= 0;
int answer;
int guess;
srand(time(0));
guess = rand() %101;
do{
cout << "Enter a number between 1 and 10";
cin>> answer;
}
while (answer > guess);
{
cout <<"Your guess is too high" << endl;
} else if (answer < guess); error here Intellisense: expected a statement
{
cout << "Your guess is too low" << endl;
} else if{count++);error here Intellisense: expected a statement
}while (answer!=guess);
if (answer == guess)
cout <<"You guessed it" <<endl;
system("pause");
return 0;
Please enable JavaScript to view the
comments powered by Disqus.