Image

Programs - C Language - General Programs

Program:


#include<stdio.h>
#include<conio.h>
main()
{
int p1,p2,p3,total;
float perc;
char gender;
clrscr();
printf("\nEnter 3 subject marks ");
scanf("%d%d%d",&p1,&p2,&p3);
printf("\nEnter Gender (F/M) ");
scanf("%c",&gender);
//gender=getchar();
total=p1+p2+p3;
perc=(float)(total/3);
if(perc>=62 && gender=='F')
printf("\nAdmitted");
else
 printf("\nAdmission Cancelled");
getch();
}