#include
#include
#include
#include
# define MAX 80
The main ()
{
Time_t o;
Srand ((unsigned) time (& amp; O));
Int arr [81], a [81].
Int j=0;
Int I=0;
Int t, g, h;
for(i=0; i<81; I++)
A [I]=(I + 1);
I=80;
While (j<81)
{
H=(rand () % (MAX - j));
Arr=[j] a [h];
A [h]=a, [I].
A [I]=0;
I -;
j++;
}
for(t=0; T<81; T++)
Printf (" % d ", arr [t]);
}
CodePudding user response:
What problemCodePudding user response:
Don't run don't know what is the problem???????CodePudding user response:
#include#include
#include
#include
#include
# define MAX 80
The main ()
{
Time_t o;
Srand ((unsigned) time (& amp; O));
Int arr [81], a [81].
Int j=0;
Int I=0;
Int t, g, h;
for(i=0; i<81; I++)
A [I]=(I + 1);
I=80;
While (j<81)
{
If (j==80)
{
H=0;
break;
}
The else
{
H=(rand () % (MAX - j));//if the j=80, then an error here, so special disposal of j=80
}
Arr=[j] a [h];
A [h]=a, [I].
A [I]=0;
I -;
j++;
}
for(t=0; T<81; T++)
Printf (" % d ", arr [t]);
}
CodePudding user response:
int main (int arg c, * argv [])
{
Time_t o;
Srand ((unsigned) time (& amp; O));
Int arr [81], a [81].
int j=0;
int i=0;
Int t, g, h;
For (I=0; I & lt; 81; I++)
A [I]=(I + 1);
I=80;
While (j & lt; 81-1)
{
H=(rand () % (MAX - j));
Arr=[j] a [h];
A [h]=a, [I].
A [I]=0;
I -;
j++;
}
For (t=0; T & lt; 81; T++)
Printf (" % d ", arr [t]);
return 0;
}