I need the user to enter the numbers 1, 2 or 3 to choose the locations, and if not select one, ask again.
However, when you enter the number 0 or 4, for example, it returns to the home screen (which would be the menu of destinations, costs and exit).
I need it to say "Enter a valid city code" and ask again one of the three numbers.
What did I do wrong?
printf("Selecione a opcao desejada:\n 1 - Destinos \n 2 - Custos \n 3 - Sair\n");
scanf("%d", &op);
switch(op) {
case 1 : printf("\n1 - Destinos:\n\n Codigo da cidade Valor da passagem por pessoa\n\n");
printf(" 1 - Nova York ===> R$3.231,00\n");
printf(" 2 - Londres ===> R$3.789,00\n");
printf(" 3 - Dubai ===> R$4.932,00\n\n");
printf("Informe o numero de seu destino\n");
scanf("%d", &destino);
if (destino <= 0 && destino > 3) {
do{
printf("Informe um codigo de cidade valido.\n");
scanf("%d", &destino);
} while (destino <= 0 && destino > 3);
}