Aleksandr_Grigoryev

HW 27.11.17

Nov 28th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     const int n = 9;
  6.     int i, a[n],N,;
  7.     cout << "enter nine-digit nomber";
  8.     cin >> N;
  9.     for (i = n; i > 0; i--)
  10.     {  
  11.         a[i] = N%10;
  12.         N = N / 10;
  13.  
  14.         cout << a[i] << ' ';
  15.     }
  16.     system("pause");
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment