I'm trying to create a C program that shows all prime numbers from 1 to 100 using brute force, but my program shows nothing on the screen.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x=100,n=2,z=0;
int p[z];
verif:
while(x!=1)
{
while(x%n!=0)
{
if(n==(x-1))
{
z++;
p[z-1]=x;
break;
}
n++;
}
x--;
n=2;
goto verif;
}
while(z>=0)
{
printf("%d",p[z]);
z--;
}
}