Saturday 6 April 2019

Sum of even n natural program in qbasic language

Program of sum of even natural number in qbasic language is:
CLS
Remember " sum of even no."
Input n
S= 0
For k = 0 to n step 2
S = S+ 2*k
Next k
Print S
End


No comments:

Post a Comment

Books read which everyone should Read Written by the greatest literary minds of their time, they have universal themes, characters, ex...