PROBLEMS
Open a blank Excel workbook and save it as a MACRO-ENABLED file. Your workbook must contain only two worksheets named "Prob1" and "Prob2", respectively.
1. Problem 1.
a) Add a module (i.e., Module1) in the Project Explorer and write (do NOT record) all the code for this problem inside this module. Show your results in the worksheet labeled "Prob1."
b) Write code in Excel VBA to implement an algorithm to calculate the area and volume of the curved surface of a right circular cone. The description and flowchart for this algorithm are included in page 3 of this document. Your program must implement the exact algorithm depicted by the flowchart.Note: The dimensions of the right circular cone h and rmust be entered by the user into the spreadsheet "Prob1" and then assigned to variables. These variables must then be used to produce the required result(s).
DO NOT USE AN INPUT BOX TO REQUEST INPUT FROM THE USER.
c) Assign the sub procedure to a rectangular shape button.
d) The results must be displayed to the user when the button is pressed
2. Problem 2.
a) Add a module (i.e., Module2) in the Project Explorer and write (do NOT record) all the code for this problem inside this module. Show your results in a worksheet labeled "Prob2."
b) Write code in Excel VBA to implement an algorithm to determine the real roots of a quadratic equation. The description and flowchart for this algorithm are included in page 4 of this document. Your program must implement the exact algorithm depicted by the flowchart. A note to the user regarding errors may be included in the instructions for when there are no x-intercepts.
Note: The coefficientsa, b and cmust be entered by the user into the spreadsheet "Prob2" and then assigned to variables. These variables must then be used to produce the required result(s).
DO NOT USE AN INPUT BOX TO REQUEST INPUT FROM THE USER.
c) Assign the sub procedure to a rectangular shape button.
d) The results must be displayed to the user when the button is pressed.
Problem 1: The area and volume of a right circular cone can be calculated with the following formulas:
Area = Π*r*[r + √(r2 + h2)](in m2)
Volume = 1/3*Π*r2*h (in m3)
Determine the area and volume based on given values for handr.
Problem 2: The general form of a quadratic function is f(x) = ax2 + bx + c. The real roots of a quadratic function can be determined with the quadratic formula:
x = (-b±√b2 -4ac)/2a
Determine the roots of aquadratic function based on given values for the coefficients a, b and c.
Attachment:- Homework.rar