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