arlabbe0606
22.10.2019 •
Computers and Technology
Given an array temps of double, containing temperature data, and an int variable n that contains the number of elements in temps: compute the average temperature and store it in a variable called avgtemp. besides temps, n, and avgtemp, you may use only two other variables -- an int variable k and a double variable total, which have been declared.
Solved
Show answers
More tips
- C Computers and Internet How to Get Rid of 3pic Infector: Everything You Need to Know...
- A Auto and Moto Experience the World of the Most Expensive Cars on the Planet...
- S Style and Beauty How to Get Rid of a Double Chin?...
- F Food and Cooking How to Cook Julienne? Recipes and Tips...
- D Dating, Love, Relationships 10 Useful Tips on How to Survive a Breakup?...
- F Food and Cooking Apple Cider Vinegar: The Ultimate Health and Beauty Solution...
- C Computers and Internet Е-head: How it Simplifies Life for Users?...
- F Family and Home How to Choose the Best Diapers for Your Baby?...
- F Family and Home Parquet or laminate, which is better?...
- L Leisure and Entertainment How to Properly Wind Fishing Line onto a Reel?...
Answers on questions: Computers and Technology
- H History I need help pleas!! Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional questions. Online...
- E English You don’t need to wear a hat today. It is ………… hot outside. A. boiling B. sunny C. clear D. freezing...
- B Business Suppose the pre-tax price of gasoline is $1/gallon. An imposed tax of $0.50/gallon is paid by producers to the government, increasing the price of gasoline to $1.30/gallon....
- C Chemistry Explain why this substance is formed?...
Ответ:
The answer for the given question is :
total=0; // initialize the variable "total" to 0
for (k=0; k<n; k++) { //set for loop
total += temps[k];
}
avgTemp =total/n; //the answer will be stored in "avgTemp" variable
Explanation:
Here, we set variable "total" and initialize to 0.
Then, we set the for loop which starts from 0 and stops at "n".
After, that we calculate the average temperature and store the result of calculation in "avgTemp" variable.
Ответ:
I would agree because if u mess up, how can it be ur parents fault? If they told u to do the dishes, and u accidentally brake one, it's not ur parents fault. But on the other hand, If your parent told you that u were taking art class or something, and u don't want to, but the parent forces u, then it's the parents fault ur taking that class.
Explanation: