15,567,221 members
See more:
```Determination of the minimum pair of numbers that, when divided, give a number with a period after the decimal point.
// A number with a period is formed from the entered values.
// The first - before the comma, the second - after.
// https://www.webmath.ru/poleznoe/formules_12_18.php see "To Convert a Pure Periodic Fraction to a Common Fraction"
// Two numbers are passed to the input: 0 and 6
// meaning the number 0,(6)
// the output is a pair of numbers 2 and 3
public static void periodicFractionCalculation(int[] digits) {
System.out.println("Print result");
}

public static void main(String[] args) {
// Test suites:
// input 0 and 3
// input 1 and 6
// input 1 and 481
//periodicactionCalculation();
}```

What I have tried:

I have tried this in Java but not able to get the correct algorithm. I needed the alogorithm to solve this question
Posted
Updated 10-Jul-22 1:07am
Richard MacCutchan 10-Jul-22 3:16am
The programming language has no relation to the algorithm. You need to work out how to solve the question first. Converting the logical steps into code is the easy part. But the description above is not clear; are you just looking for two numbers which multiplied together give the second number?

## Solution 1

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]

## Solution 2

Quote:
Determination of the minimum pair of numbers that, when divided, give a number with a period after the decimal point.

Your requirement is not clear at all. What is "minimum pair" ? what is "a number with a period after the decimal point" ?
Quote:
I have tried this in Java but not able to get the correct algorithm.

You show absolutely nothing, no try, you do not even try to do some input from user.
Your request is a do my homework !
Here we help you to fiw your code, but you need to attempt something and show it.

If really you cann't come out with anything, you should have a talk with your teacher.