5.
Write a program in
QBASIC to find square of a given number using FUNCTION…..END FUNCTION.
DECLARE FUNCTION SQUARE (N)
CLS
INPUT “ENTER ANY NUMBER”; N
PRINT “SQUARE OF NUMBER “; SQUARE (N)
END
FUNCTION SQUARE (N)
SQUARE = N ^ 2
END FUNCTION
No comments:
Post a Comment