Computer Science, asked by varunjha, 1 year ago

30. Rewrite the function func() without using the variable flag.
#include<math.h>
int func(int n) ;
int main(void)
int n;
printf ("Enter a number : ");
scanf("%d",&n);
printf("%d", func (n));
return 0;
int func(int n)
int i, flag=0;
for(i=2; i<=sqrt (n); i++)
{
if (n%i==0)
flag=1;
break;
return flag;​

Answers

Answered by johnsonchloe
1

Answer:

! 47

Explanation:

Similar questions