-->
Showing posts with label sub program. Show all posts
Showing posts with label sub program. Show all posts

Monday, July 14, 2025

SEE Computer Science: sub procedure program – QBASIC Sub Procedure Program Explained-2081 BS

 

QBASIC programs collection

Sub  procedure program [Triton model question-2081 set V q5]

DECLARE SUB SENDUP (S$)

E$ = "NPABSON"

Call SENDUP(E$)

End

Sub SENDUP (S$)

    For i = 1 To Len(S$) Step 1

        If i Mod 2 <> 0 Then

            EE$ = EE$ + LCase$(Mid$(S$, i, 1))

        Else

            EE$ = EE$ + UCase$(Mid$(S$, i, 1))

        End If

    Next i

    Print EE$

End Sub


SEE Computer Science: sub procedure program – QBASIC Sub Procedure Program Explained-2079 BS

 

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