Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.*;
- public class StacksAndQueues {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double income = Double.parseDouble(scanner.nextLine());
- double averageSuccess = Double.parseDouble(scanner.nextLine());
- double minimumWage = Double.parseDouble(scanner.nextLine());
- if (income < minimumWage && averageSuccess >= 4.5) {
- double socialSuccess = Math.floor(minimumWage * 0.35);
- System.out.printf("You get a Social scholarship %.0f BGN", socialSuccess);
- } else if (averageSuccess >= 5.50){
- double success = Math.floor(averageSuccess * 25);
- System.out.printf("You get a scholarship for excellent results %.0f BGN", success);
- } else {
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Add Comment
Please, Sign In to add comment