Given 3 numbers x, y and n compute the division (x/y) upto n decimal places.
Input : x = 22, y = 7, n = 10 Output : 3.1428571428 Explanation : Since n = 10, division (x / y) is taken till 10 decimal places. Input : x = 22, y = 7, n = 20 Output : 3.14285714285714285714
- Get the remainder and get it subtracted by the dividend, multiply it by ten and go to the next iteration.
- If we reach the complete result, we may not need to continue until the pre-defined number of iterations are reached.
- Number of digits before the decimal point in the division of two numbers
- Efficient Program to Compute Sum of Series 1/1! + 1/2! + 1/3! + 1/4! + .. + 1/n!
- C Program to Compute Quotient and Remainder
- Program to get the Sum of series: 1 - x^2/2! + x^4/4! -.... upto nth term
- Program to find the sum of the series 23+ 45+ 75+..... upto N terms
- Program to print pentatope numbers upto Nth term
- Program to print tetrahedral numbers upto Nth term
- Program to count number of distinct Squares and Cubes upto N
- Program for Decimal to Binary Conversion
- Program for decimal to hexadecimal conversion
- Program for Binary To Decimal Conversion
- Find the sum of digits of a number at even and odd places
- Total number of ways to place X and Y at n places such that no two X are together
- Check whether sum of digits at odd places of a number is divisible by K
- Primality test for the sum of digits at odd places of a number
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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.