#include <stdio.h>
int main()
{
int n,i,x,flag=1;
for(n=6;flag;n++)
{
for(x=n,i=1&&flag;i<=5;i++)
if(0==(x-1)%5)
x=4*(x-1)/5;
else flag=0;
if(flag)
break;
else flag=1;
}
printf("Total number of fish catched=%d\n",n);
return 0;
}
[root@localhost 15]# ls a.out fishing.c [root@localhost 15]# ./a.out Total number of fish catched=3121