Write a C++ program that declares an arrayalphaof50components of typedouble. Initialize the array so that the first 25 components are equal to the square of the index variable (the position that element will occupy), and the last 25 components are equal to three times the index variable. Output the array so that 10 elements per line are printed.
For the number at index 5, the value would be 25, which is 5 squared. The 25th index would hold a value of 75, which is 3 * 25.
An example of the program output is shown below:
XXXXXXXXXX64 81
XXXXXXXXXX XXXXXXXXXX
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here