Write C Program Declares Array Alpha 50 Components Type Double Initialize Array First 25 C Q37080464

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.