Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TestForChris.cpp : main project file.
- #include <iostream>
- using namespace std;
- int Ntimes(int N)
- {
- int count;
- count = 0;
- do
- {
- if (N % 2 == 0)
- {
- N = N/2;
- }
- else
- {
- N = N*3 + 1;
- }
- count++;
- }
- while (N!=1);
- return count;
- }
- int main(array<system::String ^> ^args);
- {
- int N;
- cout << "Enter Input: ";
- cin >> (N);
- cout<<(N*(N));
- system("Pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment