You are on page 1of 1

class Lab2Abso { public static void main(String args[]) { int i=Integer.parseInt(args[0]); if(i>0) { System.out.println("Abs("+i+")="+i); } else if(i<0) { System.out.

println("Abs("+i+")="+(-i)); } else System.out.println("Enter value other than zero"); } }

You might also like