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
Post a Comment
Thanks For Your Comment. We will reply you as soon as possible ...