Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Scan {
- public static void main (String[] args){
- Scanner in = new Scanner(System.in);
- System.out.println("Podaj szerokość w calach");
- Double paperWidth = in.nextDouble();
- System.out.println("Podaj wysokość w calach");
- Double paperHeight = in.nextDouble();
- final double CM_PER_INCH = 2.54;
- double width = paperWidth * CM_PER_INCH;
- double height = paperHeight * CM_PER_INCH;
- System.out.println("Rozmiar kartki wynosi "+width+"cm na "+height+"cm");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement