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