QBASIC programs collection- 2079 B.S. GP
Sub and function procedure program [Triton model question]
'rem q9 A 2079 GP
declare sub perimeter(l,b)
declare function area(l,b)
Cls
Input "enter length and breadth"; 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 is"; p
End Sub
Function area (l, b)
area = l * b
End Function
No comments:
Post a Comment