Question: Write a program that get a user input number and print the sum of odd digits in the number. For example, if a user input

Write a program that get a user input number and print the sum of odd digits in the number. For example, if a user input 12345, then the program should print 9, which is the sum of the odd digits 1, 3, and 5. For example: Test1 Input12345 Result9

(I really have no idea how to avoid "time limit exceeded")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!