1public class ProgrammingEx5_5 {
2 public static void main(String[] args) {
3 final int END = 199;
4 final int POUND_START = 20;
5
6 // printing table header
7 System.out.printf("%-9s%15s","Kilograms","Pounds");
8 System.out.print("\t|\t");
9 System.out.printf("%-9s%15s\n","Pounds","Kilograms");
10
11 for (int j=0, i = 1; i <= END; i+=2, j+=5) {
12 System.out.printf("%-9d%15.1f", i, i * 2.2);
13 System.out.print("\t|\t");
14 System.out.printf("%-9d%15.1f\n",POUND_START+j,(POUND_START+j)/2.2);
15
16 }
17 }
18}
19