Question: ***USING C++ LANGUAGE PLEASE*** 1) Write a program that will read in grades, the number of which is also input by the user. The program
***USING C++ LANGUAGE PLEASE***


1) Write a program that will read in grades, the number of which is also input by the user. The program will find the sum of those grades and pass it, along with the number of grades, to a function which has a "pass by reference" parameter that will contain the numeric average of those grades as processed by the function. The main function will then deter-mine the letter grade of that average based on a 10 -point scale. 2) Write a program that will read two floating point numbers (the first read into a variable called first. and the second read into a variable called second) and then calls the function swap with the actual parameters first and second. The swap function having formal parameters number1 and number2 should swap the value of the two variables. Sample Rumz Enter the first nunber Then hit enter 80 Enter the second nunber Then hit enter 70 You input the nunbers as 80 and 70 . after swapping, the first nunber has the value of 70 which was the value of the second nunber The second nunber has the value of 80 which was the value of the first number 3) Write a program that will input miles traveled and hours spent in travel. The program will determine miles per hour. This calculation must be done in a function other than main; however, main will print. the calculation. The function will thus have 3 parameters: miles, hours, and milesPerHour. Which parameter(s) are pass by value and which are passed by reference? Output is fixed with 2 decimal point precision. Sample Run: Please input the miles traveled 475 Please input the hours traveled 8 Your speed is 59.38 miles per hour 4) Write a program that will input temperatures for consecutive days. The program will store these values into an array and call a function that will return the average of the temperatures. It will also call a function that will return the highest temperature and a function that will return the lowest temperature. The user will input the number of temperatures to be read. There will be no more than 50 temperatures. Use typedef to declare the array type. The average should be displayed to two decimal places. Sample Ram: Please input the number of temperatures to be read 5 Input tenperature 1: 68 tnput tenperature 2: 75 tnput, tenperature 3: 36 Input tenperature 4: 91 tnput tenperature 5 : B4 The average tetperature is 70.80 The highest tetperature is 91.00 The lovest tenperature is 36.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
