Package numbers

Examples of numbers.Rational


    BSTree tree = new BSTree();
    tree.create_empty();
   
    for (int i = 0; i < input.length; ++i) {
      String[] rational = input[i].split("/");
      Rational rat = null;
      if(rational.length==2)
        rat = new Rational(Integer.parseInt(rational[0]), Integer.parseInt(rational[1]));
     
      if(rational.length == 1)
        rat = new Rational(Integer.parseInt(rational[0]), 1);
     
      if(rat != null)
        tree.insert(rat);
    }
   
View Full Code Here

TOP

Related Classes of numbers.Rational

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.