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
1
Answer:
! 47
Explanation:
Similar questions
Math,
6 months ago
Social Sciences,
6 months ago
English,
6 months ago
Math,
1 year ago
Math,
1 year ago
India Languages,
1 year ago
Math,
1 year ago