QBasic programs collection-Especially for SEE (Grade-10)
QBasic program to know the output of program using dry run table- to find the sum of numbers given as 1,2,3,4,5, using function procedure
declare function num(A)
Cls
For x = 1 To 5
Read n
s = s + num(n)
Next x
Print s
Data 1,2,3,4,5
End
Function num (a)
num = a ^ 2
End Function
output:-
program to find the output of given program |
No comments:
Post a Comment