Question: Q1. (working with arrays). (a) Write a C++ statement that creates an array of 50 integers (b) Write a while loop that reads up to
Q1. (working with arrays).
(a) Write a C++ statement that creates an array of 50 integers
(b) Write a while loop that reads up to 50 numbers into the array from the input stream infile. The loop terminates if the end of the input stream is reached and also keeps track of how many numbers were read.
(c) Write a single for loop to find the sun and average of all the positive (t.e., > 0) numbers read into the array in (b)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
