I would:
char loop='y';
while(loop == 'y') {
//Do your stuff here
printf("do you want to loop? (y/n) ");
scanf(" %c", &loop);
if(loop != 'y')
loop='n';
}
/A
1
solved In C Programming, How do I use a loop to ask user if they want to continue?