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 dohod = Double.parseDouble(scanner.nextLine());
- double usph = Double.parseDouble(scanner.nextLine());
- double zapl = Double.parseDouble(scanner.nextLine());
- double soc = zapl * 0.35;
- double uspeh = usph * 25;
- if(dohod < zapl && usph > 4.5 && usph < 5.50){
- System.out.print("You get a Social scholarship ");
- System.out.printf("%.0f", Math.floor(soc));
- System.out.print(" BGN");
- } else if (usph >= 5.5 && uspeh > soc) {
- System.out.print("You get a scholarship for excellent results ");
- System.out.printf("%.0f", Math.floor(uspeh));
- System.out.print(" BGN");
- } else if (dohod > zapl && usph >= 5.5) {
- System.out.print("You get a scholarship for excellent results ");
- System.out.printf("%.0f", Math.floor(uspeh));
- System.out.print(" BGN");
- }else if (dohod < zapl && usph >= 5.5 && uspeh < soc) {
- System.out.print("You get a Social scholarship ");
- System.out.printf("%.0f", Math.floor(soc));
- System.out.print(" BGN");
- } else {
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement