Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package yoyo;
- import java.util.Scanner;
- public class zelborsa {
- public static void main(String[] args){
- Scanner scan = new Scanner(System.in);
- //cena
- double vegPrice = Double.parseDouble(scan.nextLine());
- double fruitsPrice = Double.parseDouble(scan.nextLine());
- //kg
- int vegPerKg = Integer.parseInt(scan.nextLine());
- int fruitsPerKg = Integer.parseInt(scan.nextLine());
- //kraina cena
- double vegTotal = vegPrice * vegPerKg;
- double fruitTotal = fruitsPrice * fruitsPerKg;
- System.out.println((fruitTotal + vegTotal) / 1.94);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement