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
- C Program to Compute Quotient and Remainder
- Efficient Program to Compute Sum of Series 1/1! + 1/2! + 1/3! + 1/4! + .. + 1/n!
- 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 for sum of cosh(x) series upto Nth term
- 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 Binary To Decimal Conversion
- Program for decimal to hexadecimal conversion
- Program for Decimal to Binary 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
- Arrangement of the characters of a word such that all vowels are at odd places
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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.