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