I have a question in the following exercise:
Create a program that receives two integers and shows the result of the division of numbers and their remainder. the program should whether the user wishes to repeat the operation or close the program.
I do not know how to do it so that at the end of the program if I type 1, it ends, if you type 2 start again, here is my program:
int main()
{
int var1, var2, Q, R;
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);
int decisao;
printf("\nDeseja encerrar o programa? \n1 para sim e 2 para nao.");
scanf("%d", &decisao);
}