Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.93 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package feladat1;
  7. import java.util.Scanner;
  8. import java.math.RoundingMode;
  9. /**
  10.  *
  11.  * @author kiss.gabor
  12.  */
  13. public class Feladat1 {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.         // TODO code application logic here
  20.         Scanner console = new Scanner(System.in);
  21.       /*  System.out.println("add meg az irnyítószámodat!");
  22.         int irszam = console.nextInt();
  23.        
  24.         System.out.println("add meg városod nevét");
  25.         String a = console.next();
  26.         String nev = console.nextLine();
  27.        
  28.         System.out.println("add meg a közterület nevét!");
  29.         String b = console.next();
  30.         String utca = console.nextLine();
  31.        
  32.         System.out.println("add meg a közterület fajtáját");
  33.         String faly = console.next();
  34.        
  35.         System.out.println("add meg a hásszámodat");
  36.         int hsz = console.nextInt();
  37.         System.out.println(irszam+" "+a +""+nev+" "+b+""+utca+" "+faly+" "+hsz+".");
  38.        
  39.         console.close();
  40.        
  41.         System.out.println("kösz");
  42.         */
  43.         System.out.println("add meg az attó fogyasztását!");
  44.         double fogyaszt = console.nextDouble();
  45.         System.out.println("add meg aznak az árát amely működteti az járművedet, mely közlekedésre alkalmazható!");
  46.         double ar = console.nextDouble();
  47.         System.out.println("add meg a hosszát az útnak");
  48.         double hossz = console.nextDouble();
  49.        
  50.         System.out.println("\n\n Az utikőccség: "+Math.round(ar*fogyaszt*(hossz/100))+" európai országok közüli budapesti fővűrossal rendelkező ország pénzneme, mely nem tud eurót használni");
  51.        
  52.     }
  53.    
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement