(SUB PROCEDURE)
#WAP to find the volume of cylinder and hemisphere
>DECLARE SUB CYL( R, H)
DECLARE SUB HEMI(R)
CLS
INPUT" ENTER RADIUS"; R
INPUT" ENTER HEIGHT OF CYLINDER"; H
CALL CYL( R, H)
CALL HEMMI(R)
END
SUB CYL (R , H)
VOL=22/7*R^2*H
PRINT" VOLUME OF CYLINDER ="; VOL
END SUB
SUB HEMI(R)
H= 2/3*22/7*R^3
PRINT "VOLUME OF HEMISPHERE ="; H
END SUB
#WAP to convert Nepali currency into US dollar.
>DECLARE SUB D(NC)
CLS
INPUT "ENTER NEPALI CURRENCY VALUE";NC
CALL D (NC)
END
SUB D(NC)
US = NC/109
PRINT" AMERICAN DOLLAR ="; US
END SUB
#WAP to find area of sphere
>DECLARE SUB AREA(R)
CLS
INPUT "ENTER RADIUS OF SPHERE";R
CALL AREA (R)
END
SUB AREA(R)
A= 4*22/7*R^2
PRINT "AREA OF SPHERE=";A
END SUB
#WAP to convert US dollar into Nepali currency.
> DECLARE SUB NC(US)
CLS
INPUT'ENTER AMERICAN DOLLAR VALUE";US
CALL NC( US)
END
SUB NC (US)
N= US*109
PRINT 'NEPALI CURRENCY VALUE=";N
END SUB
#WAP convert area and volume of box.
> DECLARE SUB AREA (L,B,H)
DECLARE SUB VOLUME(L,B,H)
CLS
INPUT" ENTER LENGHT"; L
INPUT" ENTER BREADTH"; B
INPUT" ENETER HEIGHT ";H
CALL AREA (L,B,H)
CALL VOLUME (L,B,H)
END
SUB AREA (L,B,H)
A= 2*(L*B+B*H+L*H)
PRINT" AREA OF BOX=";A
END SUB
SUB VOLUME (L,B,H)
V=L*B*H
PRINT "VOLUME OF BOX=";V
END SUB
# WAP to calculate total surface area of sphere.
>DECLARE SUB TSA(R)
CLS
INPUT 'ENTER RADIUS";R
CALL TSA (R)
END
SUB TSA(R)
A=2*22/7*R^2
PRINT " TOTAL SURFACE AREA OF SPHERE=";A
END SUB
# WAP to calculate potential energyof a body
> DECLARE SUB PTL(M,H)
CLS
INPUT" ENTER MASS";M
INPUT" ENTER HEIGHT";H
CALL PTL(M,H)
END
SUB PTL(M,H)
P=M*H*9.8
PRINT" POPTENTIAL ENERGY =";P
END SUB
#WAP to convert Nepali currency into Indian currency.
> DECLARE SUB IC(NC)
CLS
INPUT"ENTER NEPALI CURRENCY VALUE";NC
CALL IC(NC)
END
SUB IC(NC)
I=NC/1.6
END SUB