Computer Science, asked by choubeysadhana1, 2 months ago

write a program in Q- basic and draw the flowchart to take a number as input from the user and print the sum of it digit. f you enterd 345 it should print 12​

Answers

Answered by Anonymous
0

Answer:

Sum of digits program in C++

We can write the sum of digits program in C++ language by the help of loop and mathematical operation only.

Sum of digits algorithm

To get sum of each digit by C++ program, use the following algorithm:

Step 1: Get number by user

Step 2: Get the modulus/remainder of the number

Step 3: sum the remainder of the number

Step 4: Divide the number by 10

Step 5: Repeat the step 2 while number is greater than 0.

Answered by pushpaspoorthi
0

Answer:

put full question so that I can understand

  • make me as brilliant
Similar questions