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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Value of Pi(Π) up to 50 decimal places
- Number of digits before the decimal point in the division of two numbers
- Program to compute log a to any base b (logb a)
- 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
- Python program for multiplication and division of complex number
- Program for sum of cosh(x) series upto Nth term
- Program to find the sum of the series 23+ 45+ 75+..... upto N terms
- Program to print tetrahedral numbers upto Nth term
- Program to print pentatope numbers upto Nth term
- Program to count number of distinct Squares and Cubes upto N
- Program for decimal to hexadecimal conversion
- Program for Binary To Decimal Conversion
- Program for Decimal to Binary Conversion
- Program to convert a BCD to Hexa-Decimal Number
- Program to convert Hexa-Decimal Number to its equivalent BCD
- Convert Decimal To Hexa-Decimal including negative numbers
- Program to Convert BCD number into Decimal number
- Find the sum of digits of a number at even and 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 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.