write a program in java to input four numbers and display the greatest and the smallest of the four numbers
Answers
Answered by
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
Math,
3 months ago
Science,
3 months ago
Social Sciences,
3 months ago
Computer Science,
6 months ago
Business Studies,
6 months ago
Chemistry,
11 months ago