Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int n;
- int factor=2;
- int main()
- {
- cout<<"n=";
- cin>>n;
- while(n>1) {
- int putere=0;
- while((n%factor)==0){
- n=n/factor;
- putere=putere+1;}
- if(putere>0)
- cout<<factor<<endl;
- cout<<putere;
- factor=factor+1;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement