allocated fishing

来源:互联网 发布:游戏汉化软件 编辑:程序博客网 时间:2024/05/29 15:46
#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

0 0
原创粉丝点击