SHARE
TWEET

Untitled

a guest Nov 15th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     setlocale(LC_ALL, "");
  9.  
  10.     int a[10], number = 0, x = 0;
  11.  
  12.     for (int i = 0; i < 10; i++) {
  13.         cout << "Введите элемент массива номер " << i << " -> ";
  14.         cin >> a[i];
  15.     }
  16.  
  17.     number = a[0];
  18.  
  19.     for (int j = 0; j < 10; j++) {
  20.         if (a[j] == number) {
  21.             number++;
  22.         }
  23.     }
  24.  
  25.     if (number == 11) {
  26.         cout << "Элементы массива представляют возрастающую последовательность." << endl;
  27.     }
  28.  
  29.     system("pause");
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top