Advertisement
Guest User

ShoolarSHIP1

a guest
Feb 23rd, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Schoolarship {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner (System.in);
  6.  
  7. double dohodBGN = Double.parseDouble(scanner.nextLine());
  8. double averagemark = Double.parseDouble(scanner.nextLine());
  9. double minworksalery = Double.parseDouble(scanner.nextLine());
  10. double plus35pecent = Math.floor(minworksalery * 0.35);
  11. double excellentmark = averagemark *25;
  12. if (dohodBGN>minworksalery){
  13. System.out.println("You cannot get a scholarship!");
  14. }else if (averagemark<5.50){
  15. System.out.println("You cannot get a scholarship!");
  16.  
  17.  
  18. }else if (dohodBGN<minworksalery && averagemark >4.50){
  19.  
  20. System.out.printf("You get a Social scholarship %.0f BGN",plus35pecent);
  21.  
  22. }else if (averagemark>5.50 ) {
  23.  
  24. System.out.printf("You get a scholarship for excellent results %.0f BGN",excellentmark);
  25.  
  26. }else if ( plus35pecent>= excellentmark){
  27. System.out.printf("You get a Social scholarship %.0f BGN",plus35pecent);
  28. }else {
  29. System.out.printf("You cannot get a scholarship!");
  30. }
  31.  
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement