Find Reciprocal
Given an integer, find its reciprocal. The reciprocal will end in infinitely recurring digits. Print the recurrence twice with a space between the first and second repetition.
For example, if N = 8, its reciprocal is 1/8 = 0.12500000..., so print 0.1250 0. If N = 9, its reciprocal is 1/9 = 0.111111..., so print 0.1 1.
Complete the function findReciprocal in the editor.
findReciprocal has the following parameter:
int N: the integer to find the reciprocal of
Returns
String: the recurrence of the reciprocal printed twice with a space between the repetitions
1Example 1
The reciprocal of 8 is 1/8 = 0.12500000..., so the output is 0.1250 0.
2Example 2
The reciprocal of 9 is 1/9 = 0.111111..., so the output is 0.1 1.
Constraints
Limits and guarantees your solution can rely on.
2 ≤ N ≤ 10^5