QBasic programs collection-Especially for SEE (Grade-10)
Qbasic program to find area and perimeter using function and sub procedure ;Question asked in 2078 B.S.
'q9 a to find area and perimeter using sub and function procedure
Declare sub perimeter(l,b)
declare function area(l,b)
Cls
Input "enter l and b"; l, b
Call perimeter(l, b)
Print "the area is"; area(l, b)
End
Sub perimeter (l, b)
p = 2 * (l + b)
Print "the perimeter="; p
End Sub
Function area (l, b)
area = l * b
End Function