Guest User

Untitled

a guest
Jan 11th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.text.DecimalFormat;
  3. public class oddnumber {
  4.  
  5.  
  6. public static void main(String[] args) {
  7. Scanner input = new Scanner(System.in);
  8.  
  9. double kilograms = 0;
  10. double pounds = 0;
  11. int counter = 0;
  12.  
  13. System.out.println("Kilograms Pounds");
  14. System.out.println("========= ========");
  15.  
  16. for (int i = 1; i < 200; i += 2) {
  17.  
  18. kilograms = input.nextFloat();
  19. pounds = (kilograms * 2.2);
  20.  
  21. System.out.printf(kilograms + " " + pounds, i+=2);
  22.  
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment