Question 4 (Marks: 15) Write the pseudocode for an application that will request the user to enter the radius of a circl
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 4 (Marks: 15) Write the pseudocode for an application that will request the user to enter the radius of a circl
Question 4 (Marks: 15) Write the pseudocode for an application that will request the user to enter the radius of a circle. The radius is the measurement from the centre of the circle to the edge of the circle. The radius should then be passed to a method which will use the value of the radius to compute the area of a circle. The result of the calculation should be returned to the mainline logic which should display the area of the circle. The formula for calculating the area of a circle is: O radius -area A = π x ¹² The calculation can also be written as: A = 3.14 x (rxr) r = radius A = area r = 3.14 (which is called Pl) Note: Provide appropriate comments in your pseudocode.