Showing posts with label WAP to find out total marks and Percentage of three subjects. Show all posts
Showing posts with label WAP to find out total marks and Percentage of three subjects. Show all posts

%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 ();

}




Labels