#include <stdio.h>
void main()
{
int m, p, c, t, mp;
printf("enter a marks of math: ");
scanf("%d", &m);
printf("enter a marks of Physics: ");
scanf("%d", &p);
printf("enter a marks of Chemistry: ");
scanf("%d", &c);
t = m + p + c;
mp = m + p;
if (t >= 190)
{
printf("you are eligible for the professional course by scoring %d.
\n welcome.", t);
}
else if (mp >= 140)
{
printf("you are eligible for the professional course by scoring %d.
\n welcome", mp);
}
else
{
printf("you are not eligible for a professional course.
\n Better luck next time.");
}
}
OUTPUT
enter marks of math: 90
enter marks of Physics: 80
enter marks of Chemistry: 85
you are eligible for the professional course by scoring 255.
welcome.
0 Comments