Problem #1: [35 pts] Write a program to calculate the estimated engine horsepower of a car based on the weight of the car (in pound), and the speed at which the vehicle finished a quarter mile (miles per hour). The formula is as follows: weight*(speed/234) HorsePower = The program displays the horsepower value with two digits after the decimal point. It also prints the message “Your car is super, drive safe", if the car horsepower is greater than or equal to 400 hp. Otherwise, it prints "Your car is nice, have a safe family trip". Sample run 1: Enter the car weight: 5000 Enter the car speed when finishing quarter mile: 70 The estimated engine power is 133.84 horsepower Your car is nice, have a safe family trip Sample run 2: Enter the car weight: 7000 Enter the car speed when finishing quarter mile: 100 The estimated engine power is 546.32 horsepower Your car is super, drive safe
Problem #1: [35 pts] Write a program to calculate the estimated engine horsepower of a car based on the weight of the car (in pound), and the speed at which the vehicle finished a quarter mile (miles per hour). The formula is as follows: weight*(speed/234) HorsePower = The program displays the horsepower value with two digits after the decimal point. It also prints the message “Your car is super, drive safe", if the car horsepower is greater than or equal to 400 hp. Otherwise, it prints "Your car is nice, have a safe family trip". Sample run 1: Enter the car weight: 5000 Enter the car speed when finishing quarter mile: 70 The estimated engine power is 133.84 horsepower Your car is nice, have a safe family trip Sample run 2: Enter the car weight: 7000 Enter the car speed when finishing quarter mile: 100 The estimated engine power is 546.32 horsepower Your car is super, drive safe
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section: Chapter Questions
Problem 7PP
Related questions
Question
Hey! Please I want this question written in Java program language
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr