The main problem is that you didn't started the while loop, and also the condition was wrong. I've commented some errors in the program, and also some recommendations.
Then I've added the same code with the errors fixed.
Original code with comments
int main()
{
int guess;
int winner = 5;
int numbertries = 0;
int maxtries = 3;
//The first error that I see is that you used a semicolon after the while declaration.
//This is only used in the do-while loops, but in this case, you shouldn't use it because
//this will skip all the while loop.
//The second error is that you'r trying to repeat it when numbertries is higher than 3, but
//in the begginning, numbertries is 0. The condition should be 'numbertries < 3', so you can
//start the loop. Also I recommend you to use the variable 'maxtries' instead of the number itself.
while(guess != winner && numbertries > 3 );
{
printf("guess a number: ");
//Here I recommend you to clear the input buffer, using the command fflush(stdin);, included in the <stdio.h> library
scanf("%d", &guess);
numbertries++;
if(guess == winner)
//At the end of the messages, you should add a new line character ('\n')
{ printf("you win"); }
else {printf("you lose");}
}
return 0;
}
New code with fixed errors
#include <stdio.h>
int main()
{
int guess;
int winner = 5;
int numbertries = 0;
int maxtries = 3;
while(guess != winner && numbertries < maxtries )
{
printf("guess a number: ");
fflush(stdin);
scanf("%d", &guess);
numbertries++;
if(guess == winner) { printf("you win\n"); }
else { printf("you lose\n"); }
}
return 0;
}
Wish I could help! Good luck!