1 ) Define an array of 8 ints named \'scores\'. (2) Set the last integer in that
ID: 439983 • Letter: 1
Question
1 ) Define an array of 8 ints named 'scores'. (2) Set the last integer in that array to 42. (3) Define and initialize an array of 3 // strings to hold "cat", "dog" and "cow" // (4) Assume the array declared here is already filled with data: const int COUNT = 100; double prices[COUNT]; // [code to fill with data already exists, but not shown] // Now, calculate and report the *average* of all prices int total = 0;Explanation / Answer
void main() {int scores [8]; score[7]=42; const int COUNT=100; double prices[COUNT]; char nam[10][3]={"cat","dog","cow"}; cin>>score[0]>>score[1]>>score[2]>>score[3]>>score[4]>>score[5]>>score[6]; int i=0,total=0; for(i=0;i>average; }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.