#include <iostream>
using namespace std;
int main(){
// simple array printing method 1
int arr[3] = {1,2,3};
cout << arr[0] << endl;
cout << arr[1] << endl;
cout << arr[2] << endl;
cout << arr[3] << "garbage value" << endl;
// simple array printing method 2
cout << "\n";
int arr1[3];
arr1[0] = 3;
arr1[1]= 5;
arr1[2] = 66;
arr1[3] = 32;
cout << arr1[0] << " " << arr1[1] << " " << arr1[2] << " " << arr1[3] << endl;
// simple array input and printing them using for loop
cout << "\n";
int arr2[5];
for (int i = 0; i < 5 ; i++){
cin >> arr2[i];
}
cout << arr2[5];
for (int i = 0; i < 5; i++){
cout << arr2[i];
cout << "\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpewovLyBzaW1wbGUgYXJyYXkgcHJpbnRpbmcgbWV0aG9kIDEKICAgIGludCBhcnJbM10gPSB7MSwyLDN9OwogICAgY291dCA8PCBhcnJbMF0gPDwgZW5kbDsKICAgIGNvdXQgPDwgYXJyWzFdIDw8IGVuZGw7CiAgICBjb3V0IDw8IGFyclsyXSA8PCBlbmRsOwogICAgY291dCA8PCBhcnJbM10gPDwgImdhcmJhZ2UgdmFsdWUiIDw8IGVuZGw7CgovLyBzaW1wbGUgYXJyYXkgcHJpbnRpbmcgbWV0aG9kIDIKICAgIGNvdXQgPDwgIlxuIjsKICAgIGludCBhcnIxWzNdOwogICAgYXJyMVswXSA9IDM7CiAgICBhcnIxWzFdPSA1OwogICAgYXJyMVsyXSA9IDY2OwogICAgYXJyMVszXSA9IDMyOwogICAgY291dCA8PCBhcnIxWzBdIDw8ICIgIiA8PCBhcnIxWzFdIDw8ICIgIiA8PCBhcnIxWzJdIDw8ICIgIiA8PCBhcnIxWzNdIDw8IGVuZGw7CgovLyBzaW1wbGUgYXJyYXkgaW5wdXQgYW5kIHByaW50aW5nIHRoZW0gdXNpbmcgZm9yIGxvb3AgICAgCiAgICBjb3V0IDw8ICJcbiI7CiAgICBpbnQgYXJyMls1XTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgNSA7IGkrKyl7CiAgICAgICAgICAgIGNpbiA+PiBhcnIyW2ldOwogICAgfQogICAgY291dCA8PCBhcnIyWzVdOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCA1OyBpKyspewogICAgICAgIGNvdXQgPDwgYXJyMltpXTsKICAgICAgICBjb3V0IDw8ICJcbiI7CiAgICB9CgoKCgoKICAgIAogICAgcmV0dXJuIDA7Cgp9Cg==