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 email@example.com. 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 numbers with all digits same in a given range
- Count of ways to write N as a sum of three numbers
- Count of numbers upto M with GCD equals to K when paired with M
- Count of decreasing pairs formed from numbers 1 to N
- Count of Octal numbers upto N digits
- Count numbers with unit digit k in given range
- Count of Missing Numbers in a sorted array
- Python program to add two numbers
- C++ program to print all Even and Odd numbers from 1 to N
- Program to find LCM of 2 numbers without using GCD
- Program for harmonic mean of numbers
- Program to Add Two Complex Numbers
- Program to find GCD or HCF of two numbers
- Program to find LCM of two numbers