In the following program, rewrite the line that contains syntax error in the correct 1. #include 2. #include cmath 3. #include 4. using namespace std 5. 6. main() 7. 8. string country 1= "Kuwait"; %3D 9. string Country_2 = "USA";

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 2MQ2
icon
Related questions
Question
In the following program, rewrite the line that contains syntax error in the correct
1.
#include <iostream>
#include cmath
2.
3.
#include <string>
4.
using namespace std
5.
6.
main()
7.
8.
string country 1= "Kuwait";
9.
string Country_2 = "USA";
10.
char country_3 = "Egypt";
11.
double m;
12.
double h;
13.
double PE;
14.
const double g = 9.8;
15.
g = 9.989;
16.
17.
cout << "Enter mass (kg) and height (m): ";
18.
cin >> M>> h;
19.
m*g*h = PE;
20.
cout << "Potential Energy is: " <<PE<<endline;
21.
22.
RETURN O;
23. }
Transcribed Image Text:In the following program, rewrite the line that contains syntax error in the correct 1. #include <iostream> #include cmath 2. 3. #include <string> 4. using namespace std 5. 6. main() 7. 8. string country 1= "Kuwait"; 9. string Country_2 = "USA"; 10. char country_3 = "Egypt"; 11. double m; 12. double h; 13. double PE; 14. const double g = 9.8; 15. g = 9.989; 16. 17. cout << "Enter mass (kg) and height (m): "; 18. cin >> M>> h; 19. m*g*h = PE; 20. cout << "Potential Energy is: " <<PE<<endline; 21. 22. RETURN O; 23. }
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning