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
- Python program to count positive and negative numbers in a list
- Count numbers that don't contain 3
- Count Odd and Even numbers in a range from L to R
- Count numbers with unit digit k in given range
- Program to parse the Molecules and get the Atoms count
- Program to count digits in an integer (4 Different Methods)
- Program for harmonic mean of numbers
- Program to find LCM of two numbers
- Program to find GCD or HCF of two numbers
- Python program to add two numbers
- C Program to Swap two Numbers
- Program to find LCM of 2 numbers without using GCD
- Program to Add Two Complex Numbers
- Program to find the count of coins of each type from the given ratio