Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //input - output
- using namespace std;
- int main()
- {
- int n, produs = 1;
- cout << "introdu n: "; cin >> n;
- for (int i = 1; i < n; i++)
- {
- if (n % i == 0)
- {
- produs = produs * i;
- //cout << i << endl;
- }
- }
- cout << "Produsul divizorilor: " << produs;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment