Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Izpit01 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int BROpHartiq = Integer.parseInt(scanner.nextLine());
- int BRPlat = Integer.parseInt(scanner.nextLine());
- double LitriLepilo = Double.parseDouble(scanner.nextLine());
- int ProcentNamalenie = Integer.parseInt(scanner.nextLine());
- double CenaHartiq = BROpHartiq * 5.80;
- double CenaPlat = BRPlat * 7.20;
- double CenaLepilo = LitriLepilo * 1.20;
- double CenaMateriali = CenaHartiq+CenaPlat+CenaLepilo;
- double Namalenie = (CenaMateriali / 100) * ProcentNamalenie;
- double FinalnaCena = CenaMateriali - Namalenie;
- System.out.printf("%.3f", FinalnaCena);
- }
- }
Add Comment
Please, Sign In to add comment