Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
image text in transcribedthis 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Does it have correct contact information?

Answered: 1 week ago