Advertisement
Filip13

cifre broja

Oct 18th, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin >> n;
  8. int x = 1;
  9.  
  10. while (x < n)
  11. {
  12. cout << n / x % 10 << endl;
  13. x = x * 10;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement