如何从以下代码中删除goto ?
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
bool is_prime(unsigned num)
{
if(num==0 || num==1)
return false;
if(num==2)
return true;
for(unsigned i=2;i<=num-1;i++)
if(num%i==0)
goto step;
return true;
step: return false;
}
int main(void)
{
unsigned n;
printf("enter the number: ");
scanf("%u",&n);
printf("%u\n",is_prime(n));
return 0;
}