1. A number is said to be a silver number if all its digits are odd. Write a program that prompts...
Â
Â
1. A number is said to be a silver number if all its digits are odd. Write a program that prompts the user to enter a number, extracts its digits, checks them if they are all odds, and displays the result Sample run 1: Enter a number 4579 It is not a silver number Sample run 2: Enter a number 17935 It is a silver number
2. Write a program that prompts the user to enter a max Value integer and a list of integers, the program ends when the user enters an integer larger than maxValue. At the end the program should output the number of input integers and their sum value. Sample Run 1: Enter a maximum integer that stops the input: 25 Enter an integer: 15 Enter an integer: 3 Enter an integer: 2 Enter an integer: 28 Input terminated!!!28 is greater than the maximum integer 25 The sum of the 3 input integers - 20 Sample Run 2: Enter a maximum integer that stops the input: 20 Enter an integer: 40 Input terminated!!!40 is greater than the maximum integer 20 You didn't input any integer that is <= 20, sum can't be computed
Solved
Programming in Java
1 Answer
Easha Imtiaz
Login to view answer.