Skip to content

Instantly share code, notes, and snippets.

@spig
Last active September 19, 2019 01:30
Show Gist options
  • Save spig/a9494768ebdb9895eb72b64d06536cf9 to your computer and use it in GitHub Desktop.
Save spig/a9494768ebdb9895eb72b64d06536cf9 to your computer and use it in GitHub Desktop.
int main(int args, const char * argv[]) {
int userNum;
cout << "Enter a number: ";
cin >> userNum;
while (userNum >= 4) {
userNum = userNum / 4;
cout << userNum << " ";
}
cout << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment