Thursday, 16 September 2021

Write a sub program to print area of a cylinder, radius and height of cylinder are given by the user in main module and pass them as parameter list when sub program is called.

Write a sub program to print area of a cylinder, radius and height of cylinder are given by the user in main module and pass them as parameter list when sub program is called.

 

DECLARE SUB cyl(r, h)

CLS

           INPUT "Enter a radius"; r

           INPUT "Enter a height"; h

CALL cyl(r, h)

END

SUB Triangle

           LET Area = (22/7)*r^2*h

           PRINT "Area of triangle is", Area

END SUB

No comments:

Post a Comment

MCQ Question Bank Microsoft PowerPoint