(c) Figure Q4(c) shows the incomplete C program to calculate the area of trapezoidal using the formula area = (bbot+btop)xht 2. Given bbot is base bottom, btop is base top and ht is height. Binclude // function declaration float trapezoidarea( ); int main () { float bb, bt,h, area; printf ("Enter the base bottom, base top and height of trapezoid: "); Scanf ("f +f ", sbb, sbt, sh) ; //function call area = trapezoidarea (bb, bt,h); fnPrint (area); return 0; // function definition Figure Q4(e) [Rajah Q4(c)] (i) Write a complete program by using function trapezoidArea to calculate the area of trapezoid and function fnPrint to display the calculated circle area. (i) Modify the C program in Figure Q4(c) so that the base bottom, base top and height values enter by user utilizing the function of passing by reference. [Ubah suai atur cara C dalam Rajah Q4(c)
(c) Figure Q4(c) shows the incomplete C program to calculate the area of trapezoidal using the formula area = (bbot+btop)xht 2. Given bbot is base bottom, btop is base top and ht is height. Binclude // function declaration float trapezoidarea( ); int main () { float bb, bt,h, area; printf ("Enter the base bottom, base top and height of trapezoid: "); Scanf ("f +f ", sbb, sbt, sh) ; //function call area = trapezoidarea (bb, bt,h); fnPrint (area); return 0; // function definition Figure Q4(e) [Rajah Q4(c)] (i) Write a complete program by using function trapezoidArea to calculate the area of trapezoid and function fnPrint to display the calculated circle area. (i) Modify the C program in Figure Q4(c) so that the base bottom, base top and height values enter by user utilizing the function of passing by reference. [Ubah suai atur cara C dalam Rajah Q4(c)
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 6E
Related questions
Question
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 6 steps with 7 images
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