How JustAnswer Works:
  • Ask an Expert
  • Get a Professional Answer
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

I need help with my C++ homework that deals with

Customer Question

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
Submitted: 5 days ago.
Category: Homework
Expert:  LogicPro replied 5 days ago.



Do you still need help?