Problem 3

Post on 11-Dec-2015

215 views 2 download

description

wut up

Transcript of Problem 3

import java.util.Scanner;public class KgToPound {

public static void main(String[] args) {// Create a ScannerScanner input = new Scanner(System.in);System.out.printf("%-20s%-20s\n", "Killograms", "Pounds");

int killograms = 1;double pounds = (2.2)*killograms;while (killograms < 20) {

System.out.printf("%-20d%-20.1f\n", killograms, pounds);killograms=killograms+2;pounds = (2.2)*killograms;

}

}}