Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.text.DecimalFormat;
- public class oddnumber {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- double kilograms = 0;
- double pounds = 0;
- int counter = 0;
- System.out.println("Kilograms Pounds");
- System.out.println("========= ========");
- for (int i = 1; i < 200; i += 2) {
- kilograms = input.nextFloat();
- pounds = (kilograms * 2.2);
- System.out.printf(kilograms + " " + pounds, i+=2);
- }
- }
- }
Add Comment
Please, Sign In to add comment