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