You are on page 1of 1

#include<conio.

h>
#include<fstream.h>
#include<stdio.h>
void main()
{float a;
int N;
cout<<"Digite el numero\n";
cin>>N;
{while(N>1)
{if(N%2==0)
a=N/2;
else
a=(3*N)+1;
cout<<""<<a<<"\n";
N=a;
}
}
getch();
}