Computer Science, asked by ugirl2873, 2 months ago

Write a program in
jave to enter a number and add all digit number​

Answers

Answered by faizkhan48631
4

Answer:

The program output is also shown below.

public class Digit_Sum.

int m, n, sum = 0;

Scanner s = new Scanner(System.

System. out. print("Enter the number:");

m = s. nextInt();

while(m > 0)

n = m % 10;

sum = sum

Explanation:

if this is correct pls mark as brilliant

Similar questions