Program to show results according to percentage in C-language
#include<stdio.h>
int main()
{
float p;
printf("Enter your percent\n");
scanf("%f",&p);
if(p>=65)
{
printf("First division");
}
else if(p>=40)
{
printf("Second division");
}
else if(p>=33)
{
printf("Third division");
}
else
{
printf("Fail");
}
}
OUTPUT
Enter your percentage
75.5
First division
Visit Homepage
Comments
Post a Comment