- Instructions Show Your Work 1 Determine And Correct The Errors In The Following Programs 10 Points 1 Sinclude Iost 1 (68.4 KiB) Viewed 29 times
Instructions: Show your work 1) Determine and correct the errors in the following programs? (10 points) 1 Sinclude
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Instructions: Show your work 1) Determine and correct the errors in the following programs? (10 points) 1 Sinclude
Instructions: Show your work 1) Determine and correct the errors in the following programs? (10 points) 1 Sinclude <iostream> 2 int main() 3-1 4 int length, width, area; 5 area- length*width; 6 length = 20; 7 width = 15; 8 cout << "The area is area; 9 return; 10 ) 11 12 a 2) Write a C++ program to convert kilometers/hr to miles/hr. The program (coding) should produce a table of 10 conversions, starting at 60 km/hr and incremented by 5 km/hr. The display (output) should have appropriate headings and a list of each km/hr and its equivalent miles/hr value. (40 points) Hint: Use the relationship that I kilometer = 0.6241 miles 3) Write a C++ program that allows the Teacher (user) to enter the grades scored (0-100) of a student. (50 points) The Teacher (user) will input the grades of 5 subjects (Math, English, Computer Science, History and Physics). After all grades have been inputted, the program should display the sum and average of the grades. If the student scored: 95 to 100 then notify the Teacher that the letter grade is A, If the score is 90 to 94.99 then notify the user that the letter grade is 4-. If the score is 87 to 89.99 then notify the user that the letter grade is B+ . If the score is 83 to 86.99 then notify the user that the letter grade is B. If the score is 80 to 82.99 then notify the user that the letter grade is B- If the score is 77 to 79.99 then notify the user that the letter grade is C+, If the score is 73 to 76.99 then notify the user that the letter grade is C. If the score is 70 to 72.99 then notify the user that the letter grade is C. If the score is 60 to 69.99 then notify the user that the letter grade is D and if the score is below 60 then notify the user that the letter grade is F. Does not matter if you use struct or class keyword Output: Should be tested will all the letter grades.