try try but don't die

Wednesday, 30 October 2019

Sum of digits

CLS
INPUT “ Enter any number”N
S = o
WHILE N<>0
R = N MOD 10
S = S+ R
N = N\ 10
WEND
PRINT “Sum of digits=“;S
END
Posted by ommaharjan2077 at 07:08
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

ommaharjan2077
View my complete profile

Blog Archive

  • ►  2020 (2)
    • ►  September (1)
    • ►  January (1)
  • ▼  2019 (20)
    • ▼  October (17)
      • 1,1,2,3,5,8.........10 th term
      • Multiplication
      • Armstrong
      • Palindrome
      • Product of digits
      • Sum of digits
      • Greatest among 3 number
      • Display odd or even
      • WAP To find positive negative or zero
      • WAP To find volume of cyclinder
      • WAP To find volume of cube
      • WAP To find volume of box
      • WAP To find area of 4 walls
      • WAP Find Area of square
      • WAP to find area of triangle
      • WAP to find area of circle
      • WAP to find the area of rectangle
    • ►  September (1)
    • ►  June (1)
    • ►  May (1)
  • ►  2018 (7)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  September (3)
    • ►  August (1)
Watermark theme. Powered by Blogger.