Page 1 of 1

How to solve it?

Posted: Mon Jul 11, 2022 9:49 am
by answerhappygod
How to solve it?
How To Solve It 1
How To Solve It 1 (70.29 KiB) Viewed 22 times
[10 Marks] 2. Write a C# application that asks the user to input the required data to implement the two methods below: (Use Method Overloading to write the methods) a. Method Perimeter that takes as input, a double value (length), calculates the perimeter of a square, and displays it. [Perimeter = 4 * length] b. Method Perimeter that takes as input two double values (length) and (width), calculates the perimeter of a rectangle, and displays it. [Perimeter = 2* (length + width)] Sample I/O Enter the length of the square: 3.2 Enter the length of the rectangle: 5.1 Enter the width of the rectangle: 2.3 The perimeter of the square is 12.8 The perimeter of the rectangle is 14.8 [15 Marks]