Skip to content

Instantly share code, notes, and snippets.

@jimmy087
Created May 4, 2013 12:49
Show Gist options
  • Save jimmy087/5517411 to your computer and use it in GitHub Desktop.
Save jimmy087/5517411 to your computer and use it in GitHub Desktop.
Conversion of kilogram to pounds
// Coversion of kilograms to pounds.
public class Exercise4_5 {
public static void main (String[] args){
System.out.println("Kilograms Pounds Pounds Kilograms");
System.out.println("--------------------------------------------------");
int kilograms = 1;
int pounds = 20;
int count = 1;
while (count <= 100 ) {
System.out.println(kilograms + " " + kilograms * 1.609 + " " + pounds + " " + pounds / 1.609);
count++;
kilograms += 2;
pounds += 5;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment