Create a program that enters an array of 5 integers from the keyboard and displays the value of the fourth element of the array.
April 8, 2021 | education
| C ++ program for task # 1:
#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
const int n = 5;
int s [n];
cout << “Enter the elements of your array from the keyboard:” << endl;
for (int i = 0; i <n; i ++) cin >> s [i];
cout << “The fourth element of your array is:” << s [4] << endl;
return 0;
}
One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.