ValerianBenchea

Afisaraea cifrelor unui nr.

Oct 24th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int c, n;
  8.     cout<<"n="; cin>>n;
  9.     while(n!=0)
  10.      {
  11.       c=n%10;
  12.       cout<<c<<" ";
  13.       n=n/10;
  14.      }
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment