Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double income = Double.parseDouble(scanner.nextLine()),
- average = Double.parseDouble(scanner.nextLine()),
- salary = Double.parseDouble(scanner.nextLine()),
- social = salary * 0.35,
- excellent = average * 25;
- if (average < 4.50) {
- System.out.println("You cannot get a scholarship!");
- } else if (average > 4.50 && average < 5.50) {
- if (income < salary) {
- System.out.println("You get a Social scholarship " + (int) social + " BGN");
- } else {
- System.out.println("You cannot get a scholarship!");
- }
- } else {
- if (income < salary) {
- if (excellent < social) {
- System.out.println("You get a Social scholarship " + (int) social + " BGN");
- } else {
- System.out.println("You get a scholarship for excellent results " + (int) excellent + " BGN");
- }
- } else {
- System.out.println("You get a scholarship for excellent results " + (int) excellent + " BGN");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement