Tuesday, 28 August 2007

%AGE OF TOTAL MARKS

WAP to find out total marks & Percentage of three subjects

void main ()

{

int m1,m2,m3;

float tm,per;

clrscr ();

printf ("Enter M1: ");

scanf ("%d",&m1);

printf ("Enter M2: ");

scanf ("%d",&m2);

printf ("Enter M3: ");

scanf ("%d",&m3);

tm=m1+m2+m3;

per=(tm/300*100);

printf ("\nTotal Marks are %.2f",tm);

printf ("\nPercentage is %.2f",per);

getch ();

}




No comments:

Post a Comment