Previous Next
0 / 18
Module DEMO-32-91DEMO-C-32

University Admission Verdict

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

A university is implementing an admission system that evaluates applicants based on their exam score, interview score, and document submission status. The admission decision follows these rules:

  1. If the exam score is 90 or higher, the applicant is admitted regardless of other factors
  2. If the exam score is 80 or higher but less than 90, the applicant is admitted only if they have submitted documents and their interview score is 85 or higher
  3. If the exam score is 70 or higher but less than 80, the applicant is admitted only if they have submitted documents and their interview score is 90 or higher
  4. If the exam score is below 70, the applicant is not admitted regardless of other factors
  5. If documents are not submitted, the applicant cannot be admitted under any circumstances

Your task is to determine whether an applicant is admitted or not based on these criteria.

Constraints

All inputs are guaranteed to be valid: exam_score and interview_score are integers between 0 and 100 inclusive documents_flag is either 'yes' or 'no' No additional constraints

Input Format

The input consists of three lines:

  1. An integer exam_score (0-100) representing the applicant's exam score
  2. An integer interview_score (0-100) representing the applicant's interview score
  3. A integer documents_flag (1 is for 'yes' or 0 is 'no') indicating whether documents were submitted

Output Format

Output a single line containing either 'ADMITTED' or 'NOT ADMITTED' based on the admission criteria

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
95
80
1
ADMITTED
Exam score 95 is >= 90, so applicant is admitted regardless of other factors.
Sample #2
Public sample
75
90
1
ADMITTED
Exam score 75 is between 70 and 80, documents submitted, and interview score 90 meets the required 90 or higher.
Sample #3
Public sample
85
90
0
NOT ADMITTED
Exam score 85 is between 80 and 90, but documents were not submitted.
Sample #4
Public sample
80
84
1
NOT ADMITTED
Exam score 80 is exactly 80 and documents were submitted, but interview score 84 is less than the required 85.
Sample #5
Public sample
75
95
1
ADMITTED
Exam score 75 is between 70 and 80, documents submitted, and interview score 95 meets the required 90 or higher.
Sample #6
Public sample
70
89
1
NOT ADMITTED
Exam score 70 is exactly 70 and documents were submitted, but interview score 89 is less than the required 90.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings