-5
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main()
{
int var1, var2, Q, R, decisao;
printf("Dividindo dois numeros\n\n");
printf("Digite o dividendo: ");
scanf("%d", &var1);
printf("Digite o divisor: ");
scanf("%d", &var2);
Q = var1 / var2;
R = var1 % var2;
printf("Resultado: %d\n", Q);
printf("Resto: %d\n", R);
printf("\nDeseja encerrar o programa?[1] para sim e [2] para nao..\nOpcao: ");
scanf("%d", &decisao);
if(decisao == 2)
return main();
if(decisao ==1);
exit (0);
system("PAUSE>>NULL");
return 0;
}
Man I even answered that question, you didn’t see ?
– rafael marques
there is already an equal question at that link
– rLinhares
This is duplicated from the other two, avoid-shutdown-on-typing-values-different-de-1-E-2 and how-do-case-the-user-type-a-number-different-de-1-E-2-he-ask-wish
– Isac