13test04:捕鱼
来源:互联网 发布:火药阴谋是否正义知乎 编辑:程序博客网 时间:2024/04/30 07:18
#include<iostream>
using namespace std;
int main()
{
int fish_sum,flag=1;
for(fish_sum=6;flag;fish_sum++)
{
int i=1;
for(int x=fish_sum;i<=5;i++)
{
{
if((x-1)%5==0)
x=4*(x-1)/5;
else flag=0;
}
}
if(flag) break;//跳出for循环不止靠测试表达式,还可以利用break、直接跳出循环.
else flag=1;
}
cout<<"the less fish numbers is:"<<fish_sum<<endl;
return 1;
}
using namespace std;
int main()
{
int fish_sum,flag=1;
for(fish_sum=6;flag;fish_sum++)
{
int i=1;
for(int x=fish_sum;i<=5;i++)
{
{
if((x-1)%5==0)
x=4*(x-1)/5;
else flag=0;
}
}
if(flag) break;//跳出for循环不止靠测试表达式,还可以利用break、直接跳出循环.
else flag=1;
}
cout<<"the less fish numbers is:"<<fish_sum<<endl;
return 1;
}
0 0
- 13test04:捕鱼
- test04
- test04
- day1 test04
- day2 test04
- day3 test04
- day4 test04
- day5 test04
- day6 test04
- day7 test04
- 捕鱼
- 捕鱼
- 捕鱼问题
- 捕鱼问题
- 捕鱼问题
- 捕鱼小游戏
- 超声波捕鱼机捕鱼方法
- 打鱼机,捕鱼游戏, 捕鱼达人
- 第三周作业——冒泡排序和归并排序
- 13test02:信用卡校验
- 【数据结构】线性表的单链表存储结构表示和实现
- 中国剩余定理 Python实现
- 数字证书-Tomcat加密配置
- 13test04:捕鱼
- Codeforces Round #139 (Div. 2) B. Well-known Numbers
- 数据结构_排序_02
- 13test05:亲密数
- 第四章 命令编程(二)
- 最大公约数(大数版)
- Untiy 接入 移动MM 详解 转
- 人,是人,真的是人---走出软件作坊:三五个人十来条枪 如何成为开发正规军(四)
- 13test06:花朵数