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