
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
the file contains a question for the daily challenge which was asked as a part of skillrack daily challenge
Typology: Lecture notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

23/06/2019 skillrack.com/faces/candidate/dailychallenge.xhtml?k=DC
skillrack.com/faces/candidate/dailychallenge.xhtml?k=DC 1/
LeaderBoard & Yesterday's Solution(/faces/candidate/leaderboarddailychallenge.xhtml?RT=DAILYCHALLENGE)
ProgramID- 8844 Solved By 631 Users
The program must accept an integer N as the input. The program must increment all the even digits of N by 1 and decrement all the odd digits of N by 1. Then the program must print the modi ed N as the output. Boundary Condition(s): 1 <= N <= 10^ Input Format: The rst line contains N. Output Format: The rst line contains modi ed N. Example Input/Output 1: Input: 12389 Output: 3298 Exaplanation: 1 is odd so it is decremented as 0 the number becomes 02389. The leading zero for integer is removed as
2 is even so it is incremented by 1 the number becomes 3389. 3 is odd so it is decremented by 1 the number becomes 3289. 8 is even so it is incremented by 1 the number becomes 3299. 9 is odd so it is decremented by 1 the number becomes 3298. Example Input/Output 2: Input: 41571 Output: 50460
Daily Challenge SkillRack
Proceed to Solve the Program