subject

Iven an array temps of double s, containing temperature data, compute the average temperature. Store the average in a variable called avgTemp. Besides temps and avgTemp, you may use only two other variables -- an int variable k and a double variable named total, which have been declared .
k = 0;
total = 0;
while (k < temps. length)
{
total = total + temps[k];
k++;
}

avgTemp = total / (temps. length);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Idon understand these and need some ! ?
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
You know the right answer?
Iven an array temps of double s, containing temperature data, compute the average temperature. Store...
Questions
question
Biology, 19.01.2021 21:20
question
Social Studies, 19.01.2021 21:20
question
Mathematics, 19.01.2021 21:20
Questions on the website: 13722367