write a java program that reads a set of integers and stops reading when the user enter a negative number . your program is required to print the sum of the right-most digit of all these integers. Hint:to get the right-most digit of any integer take modulus 10 of this integer .
SAMPLE INPUT/OUTPUT Please enter a set of integers (negative to stop) 54833 7839 1124 90 -6 The sum of the right-most digits is 16
write a java program that reads a set of integers and stops reading when the user enter a negative number . your program
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am