Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Schoolarship {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double income = Double.parseDouble(scan.nextLine());
- double avUspeh = Double.parseDouble(scan.nextLine());
- double minSalary = Double.parseDouble(scan.nextLine());
- double socialSc = 0;
- double exelentResults =0;
- if(income<minSalary && avUspeh > 4.5){
- socialSc = Math.floor(minSalary * 0.35);
- }
- if(avUspeh >= 5.5){
- exelentResults = Math.floor(avUspeh * 25);
- }if(socialSc > exelentResults){
- System.out.printf("You get a Social scholarship %.0f BGN",socialSc);
- }else if(exelentResults>socialSc){
- System.out.printf("You get a Social scholarship %.0f BGN",exelentResults);
- }else{
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement