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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- 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 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 Decimal to Binary Conversion
- Program for Binary To Decimal Conversion
- Program for decimal to hexadecimal 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 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.