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