Solutions for Class 10 ICSE Logix Kips Computer Applications with BlueJ Java | IT Developer <?php echo $page_title; ?>
IT Developer

Conditional Constructs in Java

Chapter 8

Conditional Constructs in Java

Class 10 - Logix Kips ICSE Computer Applications with BlueJ


Share with a Friend

Java Program: Kilograms to Pounds Conversion Table


14. Write a program to convert kilograms to pounds in the following tabular format (1 kilogram is 2.2 pounds):

Kilograms

Pounds

1

2.2

2

4.4

20

44.0

public class KgToPoundsTable {

    public static void main(String[] args) {

 

        System.out.println("Kilograms\tPounds");

 

        for (int kg = 1; kg <= 20; kg++) {

            double pounds = kg * 2.2;

            System.out.println(kg + "\t\t" + pounds);

        }

    }

}

Output

 
Kilograms    Pounds
     1            2.2
     2            4.4
     3            6.6
     4            8.8
     5            11.0
     6            13.2
     7            15.4
     8            17.6
     9            19.8
     10           22.0
     11           24.2
     12           26.4
     13           28.6
     14           30.8
     15           33.0
     16           35.2
     17           37.4
     18           39.6
     19           41.8
     20           44.0 

📝 Explanation

  • Loop runs from 1 to 20 kilograms
  • Conversion formula used:
  • Pounds = Kilograms × 2.2
  • \t ensures proper table formatting
  • double datatype allows decimal values