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 IncomeBGN = Double.parseDouble(scanner.nextLine());
- double AverageScore = Double.parseDouble(scanner.nextLine());
- double MinimumWage = Double.parseDouble(scanner.nextLine());
- double PartialScholarship = MinimumWage * 0.35; //147
- double FullScholarship = AverageScore * 25;
- if (IncomeBGN >= MinimumWage && AverageScore < 5.50) {
- System.out.print("You cannot get a scholarship!");
- } else if (IncomeBGN <= MinimumWage && AverageScore > 4.50 && AverageScore < 5.50){
- System.out.printf("You get a Social scholarship %.0f BGN", PartialScholarship);
- } else if (AverageScore > 5.50) {
- System.out.printf("You get a Social scholarship %.0f BGN", FullScholarship);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement