allocated fishing

xiaoxiao2021-02-27  690

#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

转载请注明原文地址: https://www.6miu.com/read-358.html

最新回复(0)