Thursday, July 28, 2011

Qbasic (Find the Volume of a Circle)

Declare Function Vol(N,A)
CLS
INPUT "Enter a radius"; R
Input "Enter the height"; h
Volume = Vol (N,A)
Print "The Volume is"; Volume
END

Function VOL(N,A)
Const PI = 3.1416
Vol = Pi * R^2 *h
END FUNCTION

No comments:

Post a Comment