#include<stdio.h> #include<ctype.h> #include<string.h> #include<iostream> #include<stack> #include<time.h> #include<math.h> using namespace std; /*test*/ //#define as '\x41' //int atoi(char s[]); //int strlen(char s[]); //void squeeze(char s[], char c); //void strcat(char s[], char t[]); //int bitcount(unsigned x); int main() { int x; int i; scanf("%d", &x); printf("%d=", x); while (x > 1) { for (i = 2;i <= x;i++) { if (x % i == 0) { printf("%d", i); x = x / i; if (x != 1) printf("*"); break; } } } } |
Double click to view unformatted code.