Question: A string is provided as input from console which consist of integer value. Insert * if subsequent numbers are even and insert '-' if subsequent
A string is provided as input from console which consist of integer value. Insert "*" if subsequent numbers are even and insert '-' if subsequent numbers are odd.
input: 21462675756 output: 214*6*2*67-5-7-56
input: 98676555533 output: 98*6765-5-5-5-5-3-3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
