Question: Write a function in Python or C that accepts an integer as input, and returns an integer. If the input is 0 , return 1

Write a function in Python or C that accepts an integer as input, and returns an integer. If the input is 0, return 1. If the input is 1, return 2. If the input is 2, return 3. If the input is 3, return 4. If the input is 4, return 5. If the input is 5, return 6. If the input is 6, return 7. If the input is 7, return 8. If the input is 8, return 9. If the input is 9, return 0. If the input is any other value, you may return any value you want.

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 Programming Questions!