# c++

10. Modify your program from Programming Project 9 so that it outputs the sum of all positive numbers, the average of all positive numbers, the sum of all nonpositive numbers, the average of all nonpositive numbers, the sum of all positive and nonpositive numbers, and the average of all numbers entered. 11. Sound travels through air as a result of collisions between the molecules in the air. The temperature of the air affects the speed of the molecules, which in turn affects the speed of sound. The velocity of sound in dry air can be approximated by the formula:

velocity ≈ 331.3 + 0.61 ×Tc where Tc  is the temperature of the air in degrees Celsius and the velocity isin meters/second. Write a program that allows the user to input a starting and an ending temperature. Within this temperature range, the program should output the temperature and the corresponding velocity in 1° increments. For example, if the user entered 0 as the start temperature and 2 as the end temperature, then the program should output

At 0 degrees Celsius the velocity of sound is 331.3 m/s At 1 degrees Celsius the velocity of sound is 331.9 m/s At 2 degrees Celsius the velocity of sound is 332.5 m/s

14

Write a program that calculates the total grade for N classroom exercisesas a percentage. The user should input the value for N followed by each ofthe N scores and totals. Calculate the overall percentage (sum of the totalpoints earned divided by the total points possible) and output it as a per-centage. Sample input and output is shown below.

How many exercises to input? 3

Score received for exercise 1:10

Total points possible for exercise 1:10

Score received for exercise 2:7

Total points possible for exercise 2:12

Score received for exercise 3:5

Total points possible for exercise 3:8

Your total is 22 out of 30, or 73.33%