subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
You know the right answer?
Write a C++ program that declares an array alpha of 50 components of type double. Initialize the arr...
Questions
question
Mathematics, 16.12.2020 17:40
question
Chemistry, 16.12.2020 17:40
question
Mathematics, 16.12.2020 17:40
question
Geography, 16.12.2020 17:40
Questions on the website: 13722363