Percentage of Mark

the program below indicates the calculation of percentage.The user is asked to enter the marks of three subjects and then the percentage of total mark is calculated

void main ()
	float m1,m2,m3;
	float per;
	float total;
	printf(" enter the marks of m1");
	scanf("%f", &m1);
	printf(" enter the marks of m2");
	scanf("%f", &m2);
	printf("enter the marks of m3");
	scanf("%f", &m3);
	total= m1+m2+m3;
	printf("the value of marks is %.2f",total);
	per = (total/300)*100;
	printf(" the percentage of each subjects is %.2f:", per);

Your Rating

Tahir khan


i am a student. i want to become a software engineer this website is so helpful for me

Post Comment This is for short comments only. Use the forum for more discussions.

HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 All rights reserved worldwide Privacy Policy Disclaimer