0
Guys, I made a menu in C language, but I need that when the user type option 4, it comes out of the repetition loop of/while, someone can help me. Thanks again to all for participating.
int opcao;
do
{
menu();
printf("\n");
printf("Opção selecionada: ");
scanf_s("%d", &opcao);
switch (opcao)
{
case 1: adicionar();
break;
case 2: modificar();
break;
case 3: relatorio();
break;
case 4: Sair;
}
} while ((opcao >= 1) && (opcao <=4));
Top, that’s exactly what I wanted to do thank you so much
– Ricardo Lima