Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class If {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double salary = Double.parseDouble(scanner.nextLine());
- double evaluation = Double.parseDouble(scanner.nextLine());
- double minSalary = Double.parseDouble(scanner.nextLine());
- double stipE = evaluation * 25;
- double stipS = minSalary * 0.35;
- if ( (salary > minSalary && stipE < 5.50 ) || evaluation < 4.50){
- System.out.printf("You cannot get a scholarship!");
- }
- else if ( evaluation > 4.5 && minSalary > salary && stipS > stipE){
- System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(stipS));
- }else if ( evaluation >= 5.50 && stipE >= stipS ){
- System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(stipE));
- }
- else{
- System.out.printf("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement