Question: Java long division recursion Hello I have a question about making a recursive method in java to do long division to print out the nth

Java long division recursion

Hello I have a question about making a recursive method in java to do long division to print out the nth digit after the decimal place:

Inputs will be taken in through scanner as follows:

A numerator

A divisor

A number n that prints out the nth digit after the decimal place.

For example:

1000/13 = 76.9230769231 so using the below input data should return the 2nd number after the decimal place which is 2

Input data:

1000

13

2

Example 2 :

1000/13 = 76.9230769231 so using the below input data should return the first number after the decimal place which is 9

Input data:

1000

13

1

Example 3:

1000/17 = 58.8235294118 so using the below input data should return the 4th number after the decimal place which is 5

Input data:

1000

17

4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!