Answer:
please mark as brainliest!!
Explanation:
public class SumOfDigits{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Please enter a number to calculate sum of digits"); int number = sc.nextInt(); // Remember number/10 reduces one digit from number // and number%10 gives you last digit int sum = 0; int input = number; while (input != 0) { int lastdigit = input % 10; sum += lastdigit; input /= 10; } System.out.printf("Sum of digits of number %d is %d", number, sum); // closing Scanner to prevent resource leak sc.close(); } }
Answer:
its B the person in the comments were right
Explanation:
took an edge test
Answer:
input device
Explanation:
any hardware device that allows users to enter programs, data, and commands into a computer system
A range check is often used when a person works with data consisting of numbers, dates and times, or currency, ensuring that a number is within a specific range.
Explanation:
- Range checks allow a person to set suitable boundaries.
- An example of a range check is checking to see if the value of a 16-bit integer is within the capacity of a 16-bit integer. When a range check is performed, upper and lower boundaries are specified.
- Range check is a validation check which can be applied to numeric fields. This is done to ensure that only numbers within a certain domain can be entered into a field. Remember that this does not necessarily mean that the data entered will be correct. But it will certainly lie within reasonable limits.
- A method of validation which checks that data falls between an upper and lower acceptable value.
- This validation check which can be applied to numeric fields. This is done to ensure that only numbers within a certain domain can be entered into a field. Remember that this does not necessarily mean that the data entered will be correct. But it will certainly lie within reasonable limits.