this code have to print all the prime numbers from 1 to 100 but when i run it cmd crash
#include <stdio.h>
int main(){
int a,b,c,d;
for(a = 0;a <= 100;a++){
d = 0;
for(b = 0;b <= 100;b++){
c = a % b;
if (c == 0)
d++;
if (d > 2)
break;
}
if (d == 2)
printf("%d\n", a);
}
return 0;
}