Question: Write a function to display information about an integer. The function must work exactly like the following examples. (Note that a digit is an

Write a function to display information about an integer. The function must

Write a function to display information about an integer. The function must work exactly like the following examples. (Note that a digit is an integer between 0 and 9). Note that you only need to put the code of the function in the answer box and nothing else (do NOT put other code of the class in the answer box). For example: Test numberInfo(5); Result Information about number 5: This is a positive number This number is odd This number is a digit number Info (-8); Information about number -8: numberInfo(0); This is a negative number This number is even This number is NOT a digit Information about number 0: This is the number zero This number is even This number is a digit Answer: (penalty regime: 0%) Reset answer 1 public static void numberInfo(int number) { // write your code here 2 3}

Step by Step Solution

3.33 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 public static void numberInfoint number 2 String info Information about number number 3 4 if ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!