158k views
3 votes
[10 points] Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of digits.

User Ang
by
5.1k points

1 Answer

5 votes

Answer:

I am going to write the program using BASIC PROGRAMMING

Step-by-step explanation:

10 PROGRAM TO CALCULATE SUM OF DIGITS

20 INPUT B,H,T,G

30 LET Y = B+H+T+G

40 PRINT Y

DO THIS ON BASIC PROGRAMMING AND YOU HAVE YOUR PROGRAM

User Alicjasalamon
by
4.4k points