Created
May 10, 2016 18:39
-
-
Save drage0/0bc037ea1e1305efca4fe240776d4e8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(void){ | |
int x,y; | |
bool b = false; | |
cin >> x; | |
y = 2; | |
while (x > 1){ | |
while ((x % y) == 0){ | |
x = x / y; | |
cout << y << '*'; | |
b = true; | |
// printf("%d*", y); | |
} | |
y++; | |
} | |
cout << (b ? "\b " : " "); | |
// printf("\b "); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment