Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Scholarships {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double incomInLeva = Double.parseDouble(scanner.nextLine());
- double midalSucses = Double.parseDouble(scanner.nextLine());
- double minLeva = Double.parseDouble(scanner.nextLine());
- double socialMany = incomInLeva * 0.35;
- double grade = midalSucses * 25;
- if (midalSucses > 5.5) {
- System.out.printf("You cannot get a scholarship!");
- } else {
- System.out.printf("You get a scholarship for excellent results BGN", grade);
- if (minLeva < incomInLeva * 0.35) {
- System.out.printf("You get a Social scholarship BGN", socialMany);
- } else {
- System.out.printf("You cannot get a scholarship");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement