Any suggestion how to do this?question is below 🖤 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Any suggestion how to do this?question is below 🖤

Task:we input number(maximum digits in this number is 100),and our task is to find other special number, whose difference between the sum of its digits at even places and the sum of digits at odd places is 0 and this special number must be bigger than number we input For example:if we input 10 then output is 11

7th May 2019, 10:15 AM
Coder21
Coder21 - avatar
3 Answers
+ 2
Interesting task! my first question is, which data type are you going to use that supports maximum 100 digits for the number. Except you take input as string, which isn't a number in a sense.
7th May 2019, 10:29 AM
Ipang
+ 1
Coder18 Alright, string it is then. I think I have an idea with odd/even digit sum comparison, but how do we work with the number and the special number while they're not a number is another issue. Do you have a work in progress so others can see clearly where you're going and how far?
7th May 2019, 11:12 AM
Ipang
0
Ipang maybe string,l have no Idea
7th May 2019, 10:32 AM
Coder21
Coder21 - avatar