ask the user if they would like to do something again in C
#include<stdio.h>
int main(){
int x, y, sum;
char ch;
print:
printf ("Enter the first number:");
scanf ("%d",&x);
printf ("Enter the second number:");
scanf ("%d",&y);
sum=x+y;
printf ("nThe total number is:%dn",sum);
again:
printf ("ntttttDo you want to repeat the operation(Y/N): ");
scanf (" %c", &ch);
if(ch == 'y' || ch == 'Y'){
goto print;
}
else if(ch == 'n' || ch == 'N'){
return 0;
}
else{
printf("ntttttPlease enter Yes or NO.n");
goto again;
}
return 0;