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(); } }
Explanation:
Binary and denary
A number base indicates how many digits are available within a numerical system. Denary is known as base 10 because there are ten choices of digits between 0 and 9. For binary numbers there are only two possible digits available: 0 or 1. The binary system is also known as base 2.
mark me brainliest please
Answer:
Its a error mistake or its alive hiding evidence for an invasion
Psychology, because psychology is the study of how the mind works, and therefor what causes stress.