Wednesday 30 October 2019

Qbasic to find Area of box using Function

DECLARE FUNCTION Area ( L, B, H )
CLS
INPUT "Enter length"; L
INPUT "Enter breadtha"; B
INPUT "Enter height"; H
PRINT " Area of box"; Area ( L, B, H )
END

FUNCTION Area ( L, B, H )
Area = 2 * ( L * H + B * H + L * B )
END FUNCTION

No comments:

Post a Comment