-->
Showing posts with label 2078 computer science questions. Show all posts
Showing posts with label 2078 computer science questions. Show all posts

Wednesday, June 11, 2025

Qbasic program to find area and perimeter using function and sub procedure | SEE computer science programming guide -2078 questions

 


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

output:

program to find area and perimeter