Wrtie a C program that will run on Linux Find the area UNDER THE CURVE FOR the f
ID: 3592438 • Letter: W
Question
Wrtie a C program that will run on Linux
Find the area UNDER THE CURVE FOR the function: f(x) = x^2
Domain - only the positive numbers between 0 - 20
-Please include the comments in the program
- within the program, let user choose the type of Reimann Sum they want (For example Upper Limit or Lower Limit) , and prompt the user to enter the rectangles that they want to insert within the curve to calculate the approximate area. (more rectangles lead to better approximtation). For example, please consider the graph below.
The Graph nine rectangles, lower Riemann Sum for the function f(x) = x^2, with the limit (0 - 3). Than you in Adance, I will definitely give you a big thumps Up for sure.
Choose function: x^2 Information Choose Riemann Sum type: o v 16 14 12 10 This is a simple quadratic function (a parabola) which never has negative y- values, so the sum of the areas of the rectangles is approximately the value of the integral The function y-r Riemann Sum7.55556 6 3.0 Exact integral dx 9.00000 0.0 12 16 20Explanation / Answer
#include #include int main() { float radius, height; float surface_area, volume; printf("Enter value for radius and height of a cylinder : "); scanf("%f%f", &radius, &height); surface_area = 2 * (22 / 7) * radius * (radius + height); volume = (22 / 7) * radius * radius * height; printf("Surface area of cylinder is: %.3f", surface_area); printf(" Volume of cylinder is : %.3f", volume); return 0; }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.