Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

There is something wrong with my code. I need the code to print out 2.20 and 4.4

ID: 3811873 • Letter: T

Question

There is something wrong with my code. I need the code to print out 2.20 and 4.41 and so on.

My code

public class KillPounds {

   public static void main(String args[]){
       System.out.println("Kilograms   Pounds");
       for (int k = 1; k <=10; k++) {
           System.out.printf(" %d %.2f ",k,(k/0.45));
           if (k%5==0) {
               System.out.println();
           }
       }
   }
}

Task 1 (Conversion from Kilograms to Pounds) Write a program that displays the following table. Keep the tab space formatting. Please attach short whiteboard ode to display problem solving thought process. Convert to 10 kilograms. Kilograms Pounds 2.20 4.41 Conversion Value) (Conversion Value) Conversion Value) Print Blank Line Conversion Value Etc.

Explanation / Answer

>>>> Use the below code. Divide the number by 0.454. You will get the expected result. public class KillPounds { public static void main(String args[]){ System.out.println("Kilograms Pounds"); for (int k = 1; k
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote