Computer Science, asked by ina11, 8 months ago

plzz solve this java program question in attachment using only if ..neither if else or laddered if else nothing just...if
plzzz solve it as fast as u all can ...
plzzzzzzz
40 points for the questionnn​

Attachments:

Answers

Answered by sathwikreddy746
0

Answer:

what is the answer for this question friend

Answered by yash6699
0

Java Program to Compute the Sum of Digits in a given Integer

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 + n;

Similar questions