how do i loop this back using do/while. i must have it loop back to stating the question if the user types "y" and have it say have a nice day if the user types "n".
#include <stdio.h>
int main(void )
{
int i, is_prime=1;
int num ;
printf("Enter a positive integer greater than 1:", &num);
scanf("%d", &num);
for(i=2; i <= num/2; i++){
if(num%i==0){
is_prime=0;
break;
}
}
if(is_prime==1){
printf("%d is a prime number.\n", num);
}
else{
printf("%d is not a prime number.\n", num);
}
printf("do you wish to continue?[y/n]");
return 0;
}