输出x为素数乘积如6=2*3 ;1=1;7=7;12=2*2*3
输入一个数X 输出x为素数乘积如6=2*3 ;1=1;7=7;12=2*2*3
#include<stdio.h>
int main(){
unsigned long num;
int p,f;
scanf(\"%lu\",&num);
if(num<=1) printf(\"%lu\",num);
else{
p =2;
f =0;
while(num-1)
if(num%p) p++;
else{
printf(f++?\"*%d\":\"%d\",p);
num /=p;
}
}
}