hackerearth

Solutions on MaxInterview for hackerearth by the best coders in the world

showing results for - "hackerearth"
Gaia
04 Jan 2018
1#include <iostream>
2using namespace std;
3
4int main()
5{
6    // Array declaration and initialization
7    int arr[5] = {4, 12, 7, 15, 9};
8    // Iterate over the array
9    for(int idx=0; idx<5; idx++)
10    {
11        // Print out each element in a new line
12        cout << arr[idx] << endl;
13    }
14    return 0;
15}