Question: Write a C++ program that declares two arrays (one-Dimensional) alpha and beta of 50 components of type double . Initialize the array using initializeArray() so
Write a C++ program that declares two arrays (one-Dimensional) alpha and beta of 50 components of type double.
Initialize the array using initializeArray() so that the first 25 components are equal to the square of the index variable, and the last 25 components are equal to three times the index variable.
Output the alpha array using printArray() so that 10 elements per line are printed.
copy the values from the alpha array to the beta array using copyArray().
Output the beta array using printArray() so that 10 elements per line are printed.
Use the following three function names (define initializeArray(), printArray(), and copyArray()):
main() - Declare the alpha array and beta array.
initializeArray() - fill the alpha array.
printArray() - Print the alpha array and beta array. Use the tab between numbers.
copyArray() - copy the values from the alpha array to the beta array.
***Do not use any pre-defined functions that were not covered in the class.
***Use only topics that were covered in the class.
***No object-oriented programming.
***Match the output below (OUTPUTS section).
Submit your source code (file name is Assignment_15_yourLastName.cpp). Make sure that it compiles using Code::Blocks.
If it doesn't compile, you will lose 50%. Improper indentation: -20%
If it doesn't produce the required results: -30%. Formatting output: -20%
Do NOT compress the file.
**************************************************************************************
OUTPUTS:
Program output (Use the tab between numbers.):
**************************************************************************************
The output of the alpha array:
0 1 4 9 16 25 36 49 64 81
100 121 144 169 196 225 256 289 324 361
400 441 484 529 576 75 78 81 84 87
90 93 96 99 102 105 108 111 114 117
120 123 126 129 132 135 138 141 144 147
The output of the beta array:
0 1 4 9 16 25 36 49 64 81
100 121 144 169 196 225 256 289 324 361
400 441 484 529 576 75 78 81 84 87
90 93 96 99 102 105 108 111 114 117
120 123 126 129 132 135 138 141 144 147
**************************************************************************************
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
