You are on page 1of 2

CS10-8L

Laboratory 3 Date 01/09/2022


Exercise #

Name Marcus Del Rosario Section A34

File Name: Surname_MP3.m

Problem Statement:
The perimeter, approximate surface area, the approximate volume of an in ground
pool are given by the following formula:
Perimeter = 2(length + width)
Volume = length * width * average depth
Underground surface area = 2(length + width) average depth + length * width
Using these formula as a basis, write a MATLAB program that accepts the length,
width and average depth measurements, and then calculates the perimeter, volume,
and underground surface area of the pool. In writing your program, make the
following two calculations immediately after the input data has been entered: length
* width and length + width. The results of these two calculations should then be
used, as appropriate, I n the assignments statements for determining the perimeter,
volume, and underground surface area without recalculating them for each equation.
Verify the results of your program by doing a hand calculation using the following test
data: length equals 25 feet, width equals 15 feet, and average depth equals 5.5 feet.
When you have verified that your program is working, use it to complete the following
table:

Length Width Depth Perimeter Volume Underground


Surface Area
25 10 5.0 30 250 200
25 10 5.5 70 1375 635
30 12 5.5 84 1980 822
30 12 5.0 84 1800 780
30 12 6.5 84 2340 906
Laboratory Exercise Score Sheet

Name: _________________________________________

Criteria Score

1 Proper program indention. 5

2 Program contains the prescribed comments 5

3 Intelligent naming of variables 10

4 Program informs the user of what to input 10

5 Correct formula for perimeter 10

6 Correct formula for volume 10

7 Correct formula for underground surface 10

8 Program is running without errors 10

9 Program generated the required output 20

10 Exercise finished within time-frame 10

Total 100

Engr. Cheryl Mari M. Isip _______________


Instructor Date

You might also like