Electrical and Computer Engineering
10 of 14
UAH
CPE 112
Problem-Solving Case Study:
Finding the Area Under a Curve
•RectArea (In: leftEdge, width) Out: Function value
–Return Funct(leftEdge + width/2.0) * width
•Get Data (Out: low, high, divisions)
–Prompt for low and high
–Read low, high
–Prompt for divisions
–Read divisions
–Echo print input data
•Funct (In: x) Out: Function value
• Return x*x*x