Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- 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());
- double socialSuccess = (minimumWage * 0.35);
- double success = (averageSuccess * 25);
- if (income < minimumWage && averageSuccess >= 4.5&& averageSuccess <=5.5) {
- System.out.printf("You get a Social scholarship %.0f BGN", socialSuccess);
- }
- else if (income < minimumWage && averageSuccess >= 4.5 && socialSuccess > success) {
- System.out.printf("You get a Social scholarship %.0f BGN", socialSuccess);
- }else if (averageSuccess >= 5.50) {
- System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(success));
- }
- else {
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement