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 income = Double.parseDouble(scanner.nextLine());
- double averageGrade = Double.parseDouble(scanner.nextLine());
- double minimalWorkingWage = Double.parseDouble(scanner.nextLine());
- double socialScholarship = minimalWorkingWage * 0.35;
- double excellenceScholarship = averageGrade * 25;
- if (income < minimalWorkingWage && averageGrade > 4.5){
- System.out.printf("You get a Social scholarship %.0f BGN", socialScholarship);
- } else if (averageGrade >= 5.5){
- System.out.printf("You get a scholarship for excellent results %.0f BGN", excellenceScholarship);
- } else {
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement