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
#include<stdio.h>
#include<conio.h>

void main ()
{
	float m1,m2,m3;
	float per;
	float total;
	clrscr();
	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);

	getch();
}
Your Rating




Tahir khan

09-11-2018

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

Post your comments , suggestion , error , requirements etc here




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