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 scan = new Scanner(System.in);
- double dohod = Double.parseDouble(scan.nextLine());
- double uspeh = Double.parseDouble(scan.nextLine());
- double zaplataMin = Double.parseDouble(scan.nextLine());
- //social moneyz
- if(dohod <= zaplataMin && uspeh >= 4.5)
- {
- double socStipendia = Math.floor(zaplataMin*0.35);
- System.out.printf("You get a Social scholarship %.0f BGN", socStipendia);
- }else if(uspeh >= 5.5)
- {
- double uspehCoef = Math.floor(uspeh*25);
- System.out.printf("You get a scholarship for excellent results %.0f BGN", uspehCoef);
- }else if ( uspeh < 5.5)
- {
- System.out.println("You cannot get a scholarship!");
- }
- else if(uspeh*25 < zaplataMin*0.35)
- {
- double socStipendia = Math.floor(zaplataMin*0.35);
- System.out.printf("You get a Social scholarship %.0f BGN", socStipendia
- }else
- {
- System.out.println("You cannot get a scholarship!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement