View Code of Problem 132

import java.util.Scanner;
import java.math.BigDecimal;

public class Main
{
  	public static void main(String[] args)
        {
          	Scanner input=new Scanner(System.in);
          	while(input.Hasnext())
                {
                  Bigdecimal a=input.nextBigDecimal();
                  Bigdecimal b=input.nextBigDecimal();
                  System.out.println(a.sutract(b).StripTrilingZero());
                }
        }
}
/*
Main.java:9: error: cannot find symbol
          	while(input.Hasnext())
          	           ^
  symbol:   method Hasnext()
  location: variable input of type Scanner
Main.java:11: error: cannot find symbol
                  Bigdecimal a=input.nextBigDecimal();
                  ^
  symbol:   class Bigdecimal
  location: class Main
Main.java:12: error: cannot find symbol
                  Bigdecimal b=input.nextBigDecimal();
                  ^
  symbol:   class Bigdecimal
  location: class Main
3 errors
*/

Double click to view unformatted code.


Back to problem 132