Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is the starter code to use Create a function named oddishOrEvenish that receives a single integer as a parameter, then returns Oddish if the
this is the starter code to use 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
this is the starter code to use
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started