Question
Write a C++ program in a file called ArrayAlpha_LastNameFistName.cppthat declares an array alpha of 50 components of type double. Create a function called InitializeArray()that initializes
Write a C++ program in a file called ArrayAlpha_LastNameFistName.cppthat declares an array alpha of 50 components of type double.
Create a function called InitializeArray()that initializes the array 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.
Next, create a function called OutputArray()that outputs the array so that 10 elements per line are printed.
Once you output the array, ask the user for a number and a letter. Create a function called FindMult() that uses the number to find all the multiples in the array that was printed above, and beside each of the multiples of the number print the letter. There should be a tab between each value
Run 1: 9 16 2536 49 64 81 100 121 144 169 196 225 256 289 324 361 100 141 184 529 576 5 8 81 8 87 120 123 126 129 132 135 138 141 144 14 Please enter a nunber:5 Please enter a letter:f Please place f by each nultiple of 5 Of 16 196 576 182 132 25f 225F 75F 105f 135f 36 256 78 108 138 49 289 81 64 324 84 114 144 81 361 100f 121 441 93 123 144 484 96 126 169 529 90f 120F 129 141 147 Run 2: 9 16 2536 49 64 81 100 121 14 169 196 225 256 289 324 361 400 441 484 529 576 75 78 81 84 87 120 123 126 129 132 135 138 141 144 14 Please enter a number:8 Please enter a letterx Please place x by each nultiple of 8 16x 196 576x 102 132 25 100 408x 90 121 441 93 120x 123 36 256x 78 108 138 64x 324 84 114 81 361 87 112 144x 117 144x 169 289 484 529 75 105 135 81 96x 126 129 141Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started