Access over 20 million homework & study documents

Functions and Subprogram

Content type
User Generated
Type
Study Guide
Rating
Showing Page:
1/9
FUNCTIONS & SUBGROUPS 1
hp://getmeaplus.com/messages.aspx?lang=en&msgid=79176
[Title of your Assignment]
Your name
Your Instructors name
Course #
Your Institution’s name
Date:
1

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/9
FUNCTIONS & SUBGROUPS 2
Functions and Subprogram
Write a program, using functions, that calculates the area and perimeter of a rectangle whose
dimensions (Length and width) are provided by a user.
1. Problem Analysis Following the directions in the assignment, clearly write up your problem
analysis in this section.
This program, using functions, will calculate the area and perimeter of a rectangle whose
dimensions are provided by a user. To calculate perimeter and area we need to know the two
sides of rectangle namely length and width of rectangle. The algorithm the finds the value of
Area and perimeter of a rectangle using the given information.
This is a very important problem to find out the cost of many things in term of area or
perimeter.we just need the length and the width to find out the area as well as the perimeter
of rectangle. More accurate input values mean more accurate area and perimeter will be.
Input are the two sides length and width of rectangle in cm.
Than our algorithm will find the area and perimeter using functions.
output of will the area and perimeter of the rectangle.
this is a mathematical question by using the right formulae for inputs well will get the 100%
correct answer.
2. Program Design Following the directions in the assignment, clearly write up your problem
design in this section and comment your pseudo code.
Input Module
Declare Length, Width, Area, Perimeter as float
//we need input for length
Write "what is the length of rectangle in centimeters?"
Input Length
Write “what is the width of rectangle in centimeter?"
Input Width
Calculate Area update the variable Area with the rectangle given length and width
Area= Length* Width
Calculate Perimeter update the variable Perimeter for the rectangle by 2* length + 2*width
Perimeter = (2*Rectangle_Length) + (2*Rectangle_Width)
Need to Update the values of AREA and PERIMETER using functions. calculate values using
length and width perimeters and update area and perimeter.
Function calculate AREA (Float L, Float W)
SET AREA= L*W
2

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/9

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 9 pages?
Access Now
Unformatted Attachment Preview
http://getmeaplus.com/messages.aspx?lang=en&msgid=79176 [Title of your Assignment] Your name Your Instructor's name Course # Your Institution's name Date: Functions and Subprogram Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user. 1. Problem Analysis - Following the directions in the assignment, clearly write up your problem analysis in this section. This program, using functions, will calculate the area and perimeter of a rectangle whose dimensions are provided by a user. To calculate perimeter and area we need to know the two sides of rectangle namely length and width of rectangle. The algorithm the finds the value of Area and perimeter of a rectangle using the given information. This is a very important problem to find out the cost of many things in term of area or perimeter.we just need the length and the width to find out the area as well as the perimeter of rectangle. More accurate input values mean more accurate area and perimeter will be. Input are the two sides length and width of rectangle in cm. Than our algorithm will find the area and perimeter using functions. output of will the area and perimeter of the rectangle. this is a mathematical question by using the right formulae for inputs well will get the 100% correct answer. 2. Program Design - Following the directions in the assignment, clearly write up your problem design in this section and c ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Really useful study material!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents