Count the given numbers on your fingers and find the correct finger on which the number ends.
- The first number starts from the thumb, second on the index finger, third on the middle finger, fourth on the ring finger and fifth on the little finger.
- Again six comes on the ring finger and so on.
Input : 17 Output :1 Input :27 Output :3
Asked in Paytm Campus Placement August 2017
This article is contributed by Dinesh Malav. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Python program to count Even and Odd numbers in a List
- C program to count Positive and Negative numbers in an Array
- Python program to count positive and negative numbers in a list
- Check if count of Alphabets and count of Numbers are equal in the given String
- Count numbers that don't contain 3
- Count Odd and Even numbers in a range from L to R
- Count of ways to write N as a sum of three numbers
- Count of Octal numbers upto N digits
- Count of numbers upto M with GCD equals to K when paired with M
- Count numbers with unit digit k in given range
- Count of decreasing pairs formed from numbers 1 to N
- Count of numbers in Array ending with digits of number N
- C Program to Swap two Numbers
- Program to find GCD or HCF of two numbers
- Program to find LCM of two numbers