All pastes #2103881 Raw Edit

Stuff

public text v1 · immutable
#2103881 ·published 2012-01-18 19:17 UTC
rendered paste body
import java.util.Scanner;
public class scannerx {
    public static void main(String args[]){
	    Scanner work = new Scanner(System.in);
		Scanner work2 = new Scanner(System.in);
		double i;
		String input;
		double x = 2.2;
		double y;
		System.out.println("please type in a number");
		i = work.nextInt();
		System.out.println("please type in weight mesurement(lb or kg)");
		input = work2.nextLine();
		    if (input.equals("lb")) {
		               y = i * x;
			           System.out.println(y + " kg");
		    } else if (input.equals("kg")) {
		               y = i / x;
			           System.out.println(y + " lb");
			} else {
			           System.out.println("please enter lb or kg");
		    }
    }
}