Dear All,

 

I am new to java. I want to derive the aspect ration of two numbers.

 

For example

First NumberSecend NumberRatio
422:1
16916:9
1920108016: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

FacebookTwitterLinkedin
Pin It
Joomla Tutorials for Beginners