Banner Header

Thursday, 7 September 2017

C Program to Calculate Percentage of Marks

C Program to Calculate Percentage of Marks


Example to calculate the Percentage of the student Marks. In this example we take input from user which is total marks or obtain marks...





Example: Program to Calculate Percentage of Marks

#include<conio.h>
#include<stdio.h>
int main()
{
int tot;
float obt;
float formula;
printf("Enter total marks= ");
scanf("%d", &tot);
printf("\nEnter Obtain Marks= ");
scanf("%f", &obt);
formula=(obt/tot)*100.0;
printf("\nPercentage = %f", formula);
printf("\n\nSubscribe My Channel");
getch();
}
 

Output
Enter Total Marks= 20
Enter Obtain Marks= 12
Percentage= 60.000008

Click on the download button to download file

download button

C Program to Calculate Percentage of Marks Reviewed by Waqas Ahmed Mir PC on September 07, 2017 Rating: 5 C Program to Calculate Percentage of Marks Example to calculate the Percentage of the student Marks. In this example we take input from user...

No comments: