Plenitude Property Developer offers freehold land in Penang to buyers only originated from Penang. Buyers get to choose the shape of land they want to buy. The cost of 1 m land is RM 20.00. Write a program to calculate perimeter, area and price of the land based on input of land shape and its size from buyers. The land shape details approved by the company are shown in Table 1. Table 1: Land shape and details Shape Perimeter Measurement Area Measurement R: Rectangle Perimeter-2 x (width + length) Area= width x length P: Pentagon Perimeter side x 5 S: Square Area= 5.0/2.0 x side x apothem length Area side x side Perimeter= side x 4 The program must include the following functions: 1) void calculatesRectangle(float length, float width, float "perimeterR, float "areaR) accepts value of length and width of rectangle from main function accepts address location of perimeterR and areaR calculates perimeter and area and assign to perimeterR and areaR respectively 2) void calculatesPentagon(float side, float apothem, float "perimeterP, float "areaP) • accepts value of side and apothem of pentagon from main function • accepts address location of perimeterP and areaP • calculates perimeter and area and assign to perimeterP and areaP respectively 3) void calculatesSquare(float side, float "perimeterS, float "areaS) accepts value of side of square from main function accepts address location of perimeterS and areas calculates perimeter and area and assign to perimeterS and areas respectively 4) float calculatePrice(float area) accepts value of area from main() function calculates price based on area and return the value of price 5) void printingResult(float pmeter,float area, float price) • Display the result of pmeter, area and price Loop the program until user input is other than 'R' ,'P' or 'S'. The program output should be as follows:
Plenitude Property Developer offers freehold land in Penang to buyers only originated from Penang. Buyers get to choose the shape of land they want to buy. The cost of 1 m land is RM 20.00. Write a program to calculate perimeter, area and price of the land based on input of land shape and its size from buyers. The land shape details approved by the company are shown in Table 1. Table 1: Land shape and details Shape Perimeter Measurement Area Measurement R: Rectangle Perimeter-2 x (width + length) Area= width x length P: Pentagon Perimeter side x 5 S: Square Area= 5.0/2.0 x side x apothem length Area side x side Perimeter= side x 4 The program must include the following functions: 1) void calculatesRectangle(float length, float width, float "perimeterR, float "areaR) accepts value of length and width of rectangle from main function accepts address location of perimeterR and areaR calculates perimeter and area and assign to perimeterR and areaR respectively 2) void calculatesPentagon(float side, float apothem, float "perimeterP, float "areaP) • accepts value of side and apothem of pentagon from main function • accepts address location of perimeterP and areaP • calculates perimeter and area and assign to perimeterP and areaP respectively 3) void calculatesSquare(float side, float "perimeterS, float "areaS) accepts value of side of square from main function accepts address location of perimeterS and areas calculates perimeter and area and assign to perimeterS and areas respectively 4) float calculatePrice(float area) accepts value of area from main() function calculates price based on area and return the value of price 5) void printingResult(float pmeter,float area, float price) • Display the result of pmeter, area and price Loop the program until user input is other than 'R' ,'P' or 'S'. The program output should be as follows:
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Write a C program
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 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY