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