Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

=+1.3(b), show that a trifling set is nowhere dense [A15].

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago