hi guys, I am a bit of a novice, and am having trouble getting this program to compile.
Please could anyone help me...
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main()
{
int number;
int guess;
srand ( time(NULL) );
number = rand() % 1000 + 1;
do {
printf ("I'm thinking of a number, between 1 and 1000.\n Try to guess it... \n");
scanf ("%d",&guess);
if (number < guess)
{
printf ("The secret number is lower...\n");
}
else
if (number > guess)
{
printf ("The secret number is higher...\n");
}
else
if (number != guess)
{
printf ( "Congratulations, you guessed it!\n");
}
}
system ("PAUSE");
exit(0);
}
It just gives on error when I compile it;
Error C2061 : Syntax error : identifier 'system'