Write a Java program for College Admission System

import java.util.Scanner;
public class college_admission
{
 public static void main (String[] args)
 {
  Scanner keyboard = new Scanner(System.in);
  System.out.println("Please enter your GPA: ");
  double gpa = keyboard.nextDouble();
  System.out.println("Please enter your college admission test score (0-100): ");
  double score = keyboard.nextDouble();
  if(gpa >= 6.5)
   {
    if(score >= 60)
    System.out.println("You are accepted! You can admit this college.");
    else
    System.out.println("You are not accepted! Sorry, you can't admit this college.");
   }
   else 
   if(score >= 80)
   System.out.println("You are accepted! You can admit this college.");
  }
}

Output:

Write a Java program for College Admission System

Leave a Reply

Your email address will not be published. Required fields are marked *