I see what you mean but we havnt covered for loops yet so ill have to leave it!If i wanted a loop to return to the start of the program. I have encountered another problem in my next question regarding returning a loop to the start.
Code:
include <stdio.h>
#define NUMBER 8
int main ()
{
int guess;
("Please enter a guess between 1 and 10:");
scanf("%d", guess);
while (guess >=11)
if (guess==NUMBER){
printf("\nYou have guess correctly");
}
if (guess<NUMBER){
printf("\nYou have guessed incorrectly, the");
}
if (guess>NUMBER){
printf("\nYou have guessed incorrectly");
}
return 0;
}
I have not fully completed some of the printf statements but it should run!!