Computer Science, asked by itsnirmala1977, 6 months ago

write a program in java to input four numbers and display the greatest and the smallest of the four numbers​

Answers

Answered by vivek2526
0

Answer:

please follow me

Explanation:

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