-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1.c
44 lines (32 loc) · 732 Bytes
/
1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Write a C program to find the eligibility of admission for a professional course based on the following criteria:
// Marks in Maths >= 65
// Marks in Physics >= 55
// Marks in Chemistry >= 50
// Or
// Total in all three subjects >= 180
// Sample Test Cases
// Test Case 1
// Input
// 70 60 80
// Output
// The candidate is eligible
// Test Case 2
// Input
// 50 80 80
// Output
// The candidate is eligible
// Test Case 3
// Input
// 50 60 40
// Output
// The candidate is not eligible
#include<stdio.h>
int main()
{
int m,p,c;
scanf("%d%d%d",&m,&p,&c);
if((m>=65 && p>=55 && c>=50)|| m+p+c>180)
printf("The candidate is eligible");
else
printf("The candidate is not eligible");
}