Monday, September 30, 2019

Sum of digit using sub

DECLARE SUB SUM(N)
CLS
INPUT"ENTER ANY NO";N
CALL SUM(N)
END

FUNCTION SUM (N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R
N=N\10
WEND
PRINT"SUM OF EVEN DIGIT";S
END SUB

No comments:

Post a Comment

Experience of covid-19 and cancelling SEE exam

A dangers virus called corona also know as COVID-19 took place around the world. This virus was first found in Wuhan china.this virus start...