Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int broj (long long a)
- {
- int p = 1;
- while(a>0)
- {
- p *= (a%10);
- a = a / 10;
- }
- return p;
- }
- main()
- {
- int n;
- long long i=1;
- cin >> n;
- do
- {
- i = i + 1;
- }
- while (broj(i)!=n);
- cout << i << endl;
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement