1234567891011121314151617
#include <iostream> using namespace std; int main() { const int SIZE = 4; int arr[SIZE] = { 1,2,3,4 }; int i = 0; while (i < (SIZE - 1) && arr[i] < arr[i + 1]) i++; if (i == (SIZE - 1)) cout << "Sorted" << endl; else cout << "Not sorted" << endl; }