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