Home > Back-end >  I want to call the following sub function in the main function, how should change?
I want to call the following sub function in the main function, how should change?

Time:09-24

# include & lt; stdio.h>
# include & lt; stdlib.h>
# include & lt; Time. H>
Void fun (int array [], int m);
Int main ()
{
Int A1 [13].//definition of spades
Int A2 [13].//definition of hearts
Int A3 [13].//define the plum blossom
Int A4 [13].//define square
Srand ((unsigned int) time (NULL));
Fun (A1, 13);
Fun (A2, 13);
Fun (A3, 13);
Fun (A4, 13);

return 0;
}


Void fun (int array [], int m)

{

Int I, j, n.

Array [0]=rand () % + 1;
for(i=1; I<13; I++)
{
Array [I]=rand () % + 1;
For (j=0; J{
If (array [I]==array [j])
{
I -;
}
}
}
Printf (" licensing of sorting is: \ n ");
for(i=0; I<13; I++)
{
N=array [I];
If (n<=10 & amp; & N>
=2){
Array [I]=n;
Printf (" % d ", array [I]);
}
If (n> 10 | | n==1)
{
If (n==1)
{
N=65;
}
If (n==11)
{
N=74;
}
If (n==12)
{
N=81;
}
If (n==13)
{
N=75;
}
Array [I]=n;

Printf (" % c ", array [I]);
}
}

return 0;
}

CodePudding user response:

Don't know what to ask about problems
Fun (A4, 13); This is not a child function called
  • Related