Dear All,
I am new to java. I want to derive the aspect ration of two numbers.
For example
First Number | Secend Number | Ratio |
---|---|---|
4 | 2 | 2:1 |
16 | 9 | 16:9 |
1920 | 1080 | 16:9 |
Could you please help me how to program it.
Could you please tell me how to make this code work to find the greatestCommonFactor
public int greatestCommonFactor(int screenWidth, int screenHeight)
{
return (b == 0) ? a : greatestCommonFactor(screenHeight, screenWidth % screenHeight);
}
Regards
Rajat