Site hosted by Angelfire.com: Build your free website today!

Frac Sub Parse

If you wish to view the code only, check this page. You can click the links and it should open up in a notepad file.

 

class FracsubParse{
public static void main(String args[])
{
int FNum = Integer.parseInt(args[0]);
int FDen = Integer.parseInt(args[1]);
int SNum = Integer.parseInt(args[2]);
int SDen = Integer.parseInt(args[3]);

System.out.println("Here is some fraction crud for you.");



System.out.println(FNum +"/"+ FDen + "minus " + SNum + "/" +SDen);
System.out.println("equals:");
System.out.println((FNum*SDen) - (SNum*FDen) +"/"+ (FDen*SDen));
}
}

 

No New Terms