Advertisement
Guest User

Untitled

a guest
Apr 1st, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class If {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. double salary = Double.parseDouble(scanner.nextLine());
  7. double evaluation = Double.parseDouble(scanner.nextLine());
  8. double minSalary = Double.parseDouble(scanner.nextLine());
  9. double stipE = evaluation * 25;
  10. double stipS = minSalary * 0.35;
  11. if ( (salary > minSalary && stipE < 5.50 ) || evaluation < 4.50){
  12. System.out.printf("You cannot get a scholarship!");
  13. }
  14. else if ( evaluation > 4.5 && minSalary > salary && stipS > stipE){
  15. System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(stipS));
  16. }else if ( evaluation >= 5.50 && stipE >= stipS ){
  17. System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(stipE));
  18. }
  19. else{
  20. System.out.printf("You cannot get a scholarship!");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement