QBASIC Program To Find The Volume Of Cylinder

 QBASIC Program To Find The Volume Of Cylinder 

QBASIC Program To Find The Volume Of Cylinder


QBASIC Program To Find The Volume Of Cylinder 


CLS
INPUT" Enter the radius"; R
INPUT" Enter the height"; H
V=(22/7)*R^2*H
PRINT" The volume of cylinder is "; V
END

QBASIC Program To Find The Volume Of Cylinder Using SUB Procedure

DECLARE SUB VOC (R, H)
CLS
INPUT" Enter the radius"; R
INPUT" Enter the height"; H
CALL VOC(R, H)
END
SUB VOC(R, H)
V=(22/7)*R^2*H
PRINT " The volume of cylinder is "; V
END SUB

QBASIC Program To Find The Volume Of Cylinder Using FUNCTION Procedure

DECLARE FUNCTION VOC(R, H)
CLS
INPUT" Enter the radius"; R
INPUT" Enter the height"; H
PRINT" The volume of cylinder is"; VOC(R, H)
END
FUNCTION VOC(R, H)
V=(22/7)*R^2*H
VOC=V
END FUNCTION




Comments