Aim:-Write Program for Give Division to Student in Programming c
Input:-
#include<stdio.h>
int main()
{
float p;
printf(“Enter Percentage p=”);
scanf(“%f”,&p);
if(p>=60 && p<=100)
{
printf(“first division”);
}
else if(p>49 && p<60)
{
printf(“second division”);
}
else if (p>39 && p<50)
{
printf(“third division”);
}
else
{
printf(“Fail”);
}
return 0;
}
Output:-
Enter Percentage p=90
first division
Advertisements
Leave a Reply