Write a C++ program that declares an arrayalpha of 50 components of typedouble. Initialize the array so that the first 25components are equal to the square of the index variable, and thelast 25 components are equal to three times the index variable.Output the array so that 10 elements per line are printed.
Submit your working source code (10 points)
Necessary comments ( 5 points)
General pseducode ( 5 points)
Solution
#include <iostream>#include <string>using namespace std;int main() { // declares an array alpha of 50 components of type double. int alpha[50]; // Initialize the array
OR
OR