SHARE
TWEET

Untitled

a guest Jan 11th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top