新手,帮忙找下错!!!
#include "stdio.h"#include "stdlib.h"
#include "math.h"
#include "time.h"
void output( int []);
void is_prime( int []);
main()
{
int a[100];
output(a);
is_prime(a);
}
void output( int [])
{
int i;
srand(time(NULL));
for ( i = 0; i < 100; i++);
{
a[i] = rand() % (5000 - 1000 + 1) + 1000;
printf("%d", a[i]);
}
}
void is_prime(int [])
{
int i,j;
for ( i = 1; i < 100; i++)
{
for ( j = 2; j <= (int)sqrt(a[i]); j++)
{
if( a[i] % j == 0)
{
break;
}
}
printf("%d", a[i]);
}
}
再帮我按排序输出下!!高手帮忙下!!