Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored 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