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