Show results according to percent using if statement in c language


Show results according to percent using if statement in c language 



#include<stdio.h>

int main()

{
  
float p;
  
printf("ENTER THE MARKS\n");
  
scanf("%f",&p);
  
if(p<=100&&p>=60)
  
{
    
printf("FIRST DIVISION");
  
}
  
if(p<=60&&p>=45)
  
{
   
printf("SECOND DIVISION");
  
}
  
if(p<=45&&p>=33)
  
{
   
printf("THIRD DIVISION");
  
}
  
if(p<=33)
  
{
    
printf("FAIL");
  
}

}

Post a Comment

0 Comments