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