I need help with my C++ homework
that deals with static_cast
JA: Have you begun working on a solution? What C++ code do you have so far?
Customer: #include <iostream>
using namespace std;int main()
double base, height;
int area;cout << "Enter base and height.";
cin >> base >> height;area = base * height;
cout << "The area is " << area << endl;return 0;
JA: What are the full requirements for this task? How soon do you need it completed?
Customer: Requirements of assignment: Write a program to calculate the area of a triangle. Use the formulaArea = 1/2 * base * heightPrompt the user for the base and height. Use type double to store the base and height. Use a static_cast to make sure 1/2 does not equal 0. Your output should look something like this:Enter base and height => 2.3 4.5
The area is 5.175
JA: Anything else you want the Programmer to know before I connect you?
Customer: i need to complete it by 9:30 pm