Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /* ==================================================
- Chapter 3: Logical and conditional expressions
- Ex5: Lillipot Collage
- ===================================================
- */
- public class MyProgram {
- public static void main(String[] args) {
- //variables
- int psychometric;
- float bagrot;
- int math;
- int english;
- double average;
- Scanner s=new Scanner(System.in);
- //1.2/(ציון בגרות) + 0.8 * (ציון פסיכומטרי)
- System.out.println("Enter your bagrot average: ");
- bagrot=s.nextFloat();
- System.out.println("psychometric: Enter your math score: ");
- math=s.nextInt();
- System.out.println("psychometric: Enter you english score: ");
- english=s.nextInt();
- if(bagrot<102){
- System.out.println("Enter your psychometric score: ");
- psychometric=s.nextInt();
- average = (psychometric * 0.8) + (bagrot / 1.2);
- if (average < 600)
- System.out.println("Not accepted");
- else
- System.out.println("accepted with average");
- if(psychometric>=700 && math>=145 && english>=120)
- System.out.println("accepted with psychometric");
- else {
- average = (psychometric * 0.8) + (bagrot / 1.2);
- if (average < 600)
- System.out.println("Not accepted");
- else
- System.out.println("accepted with average");
- }
- }
- else
- System.out.println("accepted with bagrot");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment