Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ (c) Write a for statement to populate an array, double val [NUMCOUNT], for the following case: Use a counter named double count that has
C++ (c) Write a for statement to populate an array, double val [NUMCOUNT], for the following case: Use a counter named double count that has an initial value of 16.2, a final value of 0.4, and a decrement of 0.2 and populate the val[] array with the value of count. What is the size, NUMCOUNT, of the array val? 2+5 points] SOLUTION: we can calculate NUMCOUNT= 1 + abs(final-initial)/increment = 1 + (16.2-0.4)/Q2 = 80 const int NUMCOUNT 80 double count, val [NUMCOUNT] int i = 0; for (count _ 16.2; count >-0.4; count -- 0.2) val [i++count; (d) Write a function named check) that has two parameters and does not return any value. Its prototype is as follows: void check (double grade[], double &average). The first parameter should accept a double-precision data array, grade[, and the second returns the average of the grades by reference. 6 points
C++
Step 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