Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA A number is given as input. Find the odd digits in the number, add them and find if the sum is odd or not.if

JAVA

A number is given as input. Find the odd digits in the number, add them and find if the sum is odd or not.if even return -1, if odd return 1 input:52315 logic:5+3+1+5=14(even) output:-1 input:1112 logic:1+1+1=3(odd) output:1

JAVA

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago