// 奇偶归一计算最大数.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main(int argc, char* argv[])
{
int n,temp=1;
printf("请输入任意正整数");
scanf("%d",&n);
while(n!=1)
{
if(temp<n)
{
temp=n;
}
if(n%2==1)
n=n*3+1;
else
n=n/2;
printf("%d\n",n);
}
printf("最大数字为%d\n",temp);
return 0;