Question: Create a function named oddishOrEvenish that receives a single integer as a parameter, then returns Oddish if the integer is oddish, and returns Evenish if

 Create a function named oddishOrEvenish that receives a single integer as
a parameter, then returns "Oddish" if the integer is oddish, and returns

Create a function named oddishOrEvenish that receives a single integer as a parameter, then returns "Oddish" if the integer is oddish, and returns "Evenish" if the integer is Evenish. A number is Oddish if the sum of all of its digits are odd, and Evenish if the sum of all of its digits are even. Header: String oddishorEvenish( int num ) \{ // Type code here \} Example Input/Output: - Input: 43 Output: "Oddish" (since 4+3 equals 7) - Input: 373 Output: "Oddish" (since 3+7+3 equals 13) - Input: 4433 Output: "Evenish" (since 4+4+3+3 equals 14 Hints: - Use the num \% 10 expression to extract the last digit from a number - Use the num / 10 expression to remove the last dight from a number - Use the num \%2 expression to determine if a number is even or odd. For Multiple Files, Custom Library and File Read/Write, use our new - Advanced Java IDE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!