I'm writing a program to prompt the user to enter a number between 1 and 5. If the value is greater than 5 or less than 1 I want the program to wait until an appropriate answer is given. This is what I came up with and it's not working. I've tried a few different tips off the net and it still isn't working. Any tips would be great, thanks.
#include <stdio.h>
int main()
{
int p1_move;
do{
printf("1 \n 2 \n 3 \n 4 \n 5\n");
printf("Player 1, enter the number:\n");
scanf("%d", &p1_move);
}while(p1_move >=6 || <=0);
}
while(p1_move >=6 || p1_move <=0);