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