Advertisement
okanfeim

Окан Ибрям БИТ 2б

Jan 31st, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7.     int x[10];
  8.     for (int i = 0; i <= 9; i++)
  9.     {
  10.         cout << "x[" << i << "]=";
  11.         cin >> x[i];
  12.         if (!cin);
  13.         {
  14.             cout << "Error,Bad input!\n";
  15.             return 1;
  16.         }
  17.     }
  18.     for (int i = 9; i >= 0; i--)
  19.         cout << x[i] << "\n";
  20.     system("PAUSE");
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement