As shown in the image, it is throwing the error. Please help me to find the solution.
Here I am using floating numbers in the switch, which is supposed to print 10.
What is the reason for this error? and why?
#include <stdio.h>
void main() {
 float a = 1.0;
 switch (a) {
    case 1:
     printf ("1");
     break;
    case 1.0:
     printf ("10");
     break;
    }
}

 
     
     
    