View Code of Problem 91

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i=2;
	cin>>n;
	cout<<n<<"=";
	while(n!=1){
		while(n%i==0){
			n=n/i;
			if(n!=1){
				cout<<i<<"*";
			}
			else cout<<i;	
		}
		i++;
	}
}

Double click to view unformatted code.


Back to problem 91