A more detail description is attached: Write a C++ program that declares an arrayalphaof 50 components of typedouble. Initialize the array so that the first 25 components are equal to the square of...

1 answer below »
A more detail description is attached:

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:


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




Instructions Write a C++ program that declares an array alpha of 50 components of type double. 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: 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 These are the checks the grading is looking for: Tasks 0.00 out of 10.00 Program outputs the alpha array. 1 0 out of 1 checks passed. Review the results below for more details. Checks Test CaseIncomplete Program outputs the alpha array Input Output Results \s*0\s*1\s*4 \s*9\s*16\s*25\s*36\s*49\s*64\s*81\s* \s*100\s*121\s*144\s*169\s*196\s*225\s*256\s*289\s*324\s*361\s* \s*400\s*441\s*484\s*529\s*576\s*75\s*78\s*81\s*84\s*87\s* \s*90\s*93\s*96\s*99\s*102\s*105\s*108\s*111\s*114\s*117\s* \s*120\s*123\s*126\s*129\s*132\s*135\s*138\s*141\s*144\s*147\s* Show Details 10.00 out of 10.00 Did not hard code program output 0 1 out of 1 checks passed. Great work! Checks Code PatternComplete Did not hard code output Description Searched your code for a specific pattern: cout\s*\<><.+(\d\s).+ you can learn more about regular expressions [here](https://ruby-doc.org/core-2.1.1/regexp.html). 0.00 out of 10.00 declared and initialized the alpha array to a size of 50 elements. 1 0 out of 1 checks passed. review the results below for more details. checks code patternincomplete declared and initialized the alpha array description searched your code for a specific pattern: .+*(double|float|int)\salpha\[50\].+* you="" can="" learn="" more="" about="" regular="" expressions="" [here](https://ruby-doc.org/core-2.1.1/regexp.html).="" 0.00="" out="" of="" 10.00="" declared="" and="" initialized="" the alpha array="" to="" a="" size="" of="" 50="" elements.="" 1="" 0="" out="" of="" 1="" checks="" passed.="" review="" the="" results="" below="" for="" more="" details.="" checks="" code="" patternincomplete="" declared="" and="" initialized="" the alpha array="" description="" searched="" your="" code="" for="" a="" specific="" pattern:="">
Answered 1 days AfterDec 02, 2021

Answer To: A more detail description is attached: Write a C++ program that declares an arrayalphaof 50...

Arun Shankar answered on Dec 04 2021
113 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here