I need some help

Hey there people.. First I want to thank all the people working in this site. It is really helpful and helped me alot. I am trying to do this random game and its guessing numbers game. But for some reason C++ doesn't want to run the game and I can't quiet figure out the problem so I need some help here. Here is my code:
#include <iostream>
#include <stdlib.h>
int main()
{
int n, again ,flag ,score ,guess ,jackpot ;
printf("Welcome to guess a number between 1 and 100\nTry for the jackpot to win $1,000,000!");
do
{
flag= 0;
score= 100;
srand(time(NULL));
n = rand()%100 + 1;
cout<< ("Enter your first guess:");
do
{
cin>> guess;
if (guess<n)
{
printf("Guess too low, try again");
score=score-10;
}
else if (guess>n)
{
printf("Guess too high, try again");
score=score-10;
}
srand ( time(NULL) );
n=rand()%100+1;
}while (score>0 and flag==0);
srand ( time(NULL) );
jackpot=rand()%100+1; ]
if (guess==jackpot)
{
printf("You hit the JACKPOT!!\nWinnings $1,000,00");
}
else
{
printf("Winnings $",score);
}
cout<< ("Enter 1 to play again, 2 to quit:");
cin>> again
}while (again==1);
system ("Pause");
}


Thanks for the help..!!
I got it guys.. I forgot to use "Using namespace std"
thanks
Topic archived. No new replies allowed.