/**
 * Exercise 5.3 from the book Introduction to Java Programming (10th).
 * <p>
 * Conversion from kilograms to pounds.
 *
 * @author Henrik Samuelsson, henrik.samuelsson(at)gmail.com
 */

public class Exercise_05_03 {

	public static void main(String[] args) {
		System.out.println("Kilograms\tPounds");
		for (int i = 1; i < 200; i = i + 2) {
			System.out.println(i + String.format("\t\t%.1f", i * 2.2));
		}
	}

}

@@ -263,37 +263,153 @@
 %7B%0A%09%09
-System.out.println(%22K
+%0A%09%09// print the heading of the table%0A%09%09String kilograms = %22Kilograms%22;%0A%09%09String pounds = %22Pounds%22;%0A%09%09System.out.printf(%22%25-10s %2510s %25n%22, k
 ilograms
 %5CtPo
@@ -408,20 +408,142 @@
 rams
-%5CtP
+, p
 ounds
-%22
 );%0A
+%09%09%0A%09%09// print the data in the table by the use of a loop%0A%09%09// will left-justify the kilograms and right-justify the pounds%0A
 %09%09fo
@@ -601,39 +601,41 @@
 rint
-ln(i + String.format(%22%5Ct%5Ct%25.1f%22
+f(%22%25-10.0f %2510.1f %25n%22, (double) i
 , i 
@@ -640,17 +640,16 @@
 i * 2.2)
-)
 ;%0A%09%09%7D%0A%09%7D

Edit of exercise 5.3.