17年1个月前IP:未同步
172113
1楼
#include "stdafx.h"
#include<iostream>
using namespace std;
int a;
int b;
int n;
int _tmain(int argc, _TCHAR* argv[])
{
loop:
    n=1;
    cout<<"请输入检测数字:";
    cin>>a;
    cout<<"\\n";
    while(a!=1){
     if(a%2==0)
        a=a*0.5;
    else
        a=(a*3+1)/2;
     cout<<"第"<<n<<"个数:"<<a<<"\\t";
     n++;
    };
    cin>>b;
goto loop;
    return 0;
}
评论
文号 / 172113

万流景仰
名片发私信
学术分 30
总主题 651 帖总回复 6037 楼拥有证书:学者 笔友
注册于 2007/04/10 19:15:00最后登录 2018/01/10 01:07:34
主体类型:个人
所属领域:无
认证方式:邮箱
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的