FUNCTIONS (Built-in and User-defined functions) 1. To understand the concept and use of user-define functions in a program 2. To be able to familiarize the syntax and structure when defining a...


Make a C program given in the instructions inside the picture


FUNCTIONS (Built-in and User-defined functions)<br>1. To understand the concept and use of user-define<br>functions in a program<br>2. To be able to familiarize the syntax and structure<br>when defining a function and íts parameters<br>3. To write C Functions<br>4. To invoke functions through function call-by-value<br>5. To compare the difference between formal and actual parameters<br>6. Construct user-defined functions using the keywords return and void<br>Topics Covered:<br>Objectives:<br>Description<br>Define and Implement the following functions:<br>float areaRect(float length, float width)<br>- returns the computed area of a rectangle<br>where: AR=length x width<br>float periRect(float length, float width)<br>- returns the computed perimeter of a rectangle<br>where: pR= 2 x (L+W);<br>float diagLine(float length, float width)<br>- returns the computed diagonal line of a<br>rectangle using the formula: dLine= sqrt(length x length + width x width)<br>float areaTria(float length, float width)<br>- returns the computed area of a triangle: aT = (length x width)/2<br>Create a function main() that will accept inputted values for the<br>length and width of a rectangle. Invoke each functions given above<br>and print the returned value of each function.<br>Sample Output if Applicable<br>CT Z:ICCS122-1L13FBC-1\EXER10.EXE<br>Enter the length of rectangle. 35<br>Enter the width of rectangle.<br>15<br>Area of Rectangle:<br>Perineter of Rectangle: 100.00<br>Diagonal Line:<br>Area of Triangle:<br>525.00<br>162.02<br>262.50<br>

Extracted text: FUNCTIONS (Built-in and User-defined functions) 1. To understand the concept and use of user-define functions in a program 2. To be able to familiarize the syntax and structure when defining a function and íts parameters 3. To write C Functions 4. To invoke functions through function call-by-value 5. To compare the difference between formal and actual parameters 6. Construct user-defined functions using the keywords return and void Topics Covered: Objectives: Description Define and Implement the following functions: float areaRect(float length, float width) - returns the computed area of a rectangle where: AR=length x width float periRect(float length, float width) - returns the computed perimeter of a rectangle where: pR= 2 x (L+W); float diagLine(float length, float width) - returns the computed diagonal line of a rectangle using the formula: dLine= sqrt(length x length + width x width) float areaTria(float length, float width) - returns the computed area of a triangle: aT = (length x width)/2 Create a function main() that will accept inputted values for the length and width of a rectangle. Invoke each functions given above and print the returned value of each function. Sample Output if Applicable CT Z:ICCS122-1L13FBC-1\EXER10.EXE Enter the length of rectangle. 35 Enter the width of rectangle. 15 Area of Rectangle: Perineter of Rectangle: 100.00 Diagonal Line: Area of Triangle: 525.00 162.02 262.50
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here