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

Frac Div

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 Fracdiv{ //REMEMBER: Your program will not run if you do not use this exact class!
public static void main(String args[])
{
int FNum = 1;// changing these numbers chages the fractions.
int FDen = 2;
int SNum = 1;
int SDen = 4;

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

// Notice that words in quotes are printed out, variables are not in quotes.

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

  

 

 

No new terms for this program.