Print division scored by student - C Program

C program to enter percentage obtained by a student and print division scored by him.

Solution:

#include <stdio.h>
int main()
{
     float per;
     printf("Enter percentage of student : ");
     scanf("%f",&per);
     if(per>=40) //Outer if
     {
          if(per>=60) //Inner if
               printf("First division");
          else
               printf("Second division");
     }
     else
     {
          printf("Third division");
     }
return 0;
}


Output-1

student division

Output-2

student division

Output-3

student division