Enter 3 subject marks, display total, persentage and class
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647void main()
{
int n1,n2,n3,*no1,*no2,*no3,*t,*p;
clrscr();
printf("enter 3 no:");
scanf("%d%d%d",&n1,&n2,&n3);
no1=&n1;
no2=&n2;
no3=&n3;
*t=*no1+*no2+*no3;
*p=*t/3;
printf("\ntot:%d",*t);
printf("\nper:%d",*p);
printf("\nclass:");
if(*p>=70)
{
printf("disti");
}
else if(*p>=60)
{
printf("first");
}
else if(*p>=50)
{
printf("second");
}
else if(*p>=40)
{
printf("pass");
}
else
{
printf("fail");
}
getch();
}
Enter 3 subject marks, display total, persentage and class
Reviewed by Unknown
on
7:45:00 PM
Rating:

No comments: