fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. const int ten = 10;
  8. int nrWell = 1;
  9. int i = 0;
  10. int cifraWellCode = 1;
  11. if (n == 0) {
  12. cifraWellCode = 0;
  13. } else {
  14. while (n > 0) {
  15. if (n == 0) {
  16. n = nrWell;
  17. } else {
  18. i = n % ten;
  19. nrWell *= i;
  20. n /= ten;
  21. i = 0;
  22. if (nrWell < ten) {
  23. cout << nrWell << "numar";
  24. } else if (n == 0) {
  25. n = nrWell;
  26. }//nr well tr sa intre in loop si sa se tot inmulteasca pana cand va fi un sg numar
  27. //bucla se va tot repeta astfe: n v alua valoarea lui nr well
  28. }
  29. } // pana cand nrWell este o cifra- tine cont
  30. }
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5304KB
stdin
324632563285











stdout
7numar0numar0numar