Homework Help Question & Answers
Part A) Write a C++ program that calculates the area under a curve. Here is the…
Part A) Write a C++ program that calculates the area under a curve. Here is the equation: f(x) = x^2 +1.5x +4 You must prompt the user for the beginning and the ending x values. You are to assume, but not check, that the user will put in whole positive numbers. The units are inches. The program input/output should look something like this: This program calculates the area under a curve between two points on the x axis. The equation is: XXXXXXXX Please Enter the min x value: Please Enter in the max x value: The area under the curve between ‘min x’ and ‘max x’ is: ‘total’ square inches. You should calculate the area using the basic “rectangular slice” method. Set your x axis intervals at 1 inch. For example, if the user input the x range from 1 inch to 4 inches, you would have three x ranges: from 1 to 2, from 2 to 3 and 3 to 4 in which you calculate the area and make a sum of the total.
PART B) Here is a second equation: f(x) = x^2 + 1.5x – 4 Program this equation in addition to the first.
PART C) Prompt the user for how many segments the x axis should be divided into. Ie., if the user sets the x axis range from 3” to 8”, part A and B would divide it into five segments. Now you prompt the user for how many segments should be used and do the proper calculations. I need help only for part c.