🟢 Վարժություն 4 🪲

Ծրագիրը պարունակում է կատարման սխալ։
Ուղղե՛ք սխալը։
#include <iostream>
int main() {
   const int n = 5;
   int arr[n] = {5, 2, 3, 1, 4};
   int i = -1;
   do {
      std::cout << arr[i] << " ";
      i++;
   } while(i < n);
}
 

Constraints

Time limit: 0.2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue