Write a program in
jave to enter a number and add all digit number
Answers
Answered by
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
Computer Science,
1 month ago
Math,
1 month ago
Math,
2 months ago
Math,
2 months ago
Science,
9 months ago