Home > Software engineering >  Vc2010 debugging success but run out
Vc2010 debugging success but run out

Time:11-12

O bosses help
Thanks brother
Eldest brother is the most handsome coolest

CodePudding user response:

I must first initialize it in the main, the back of the function calls, nor is the purpose of you?

CodePudding user response:

No, I want to use the function

CodePudding user response:

First of all, your child function, three incoming isn't necessary, all incoming values are not used
 
#include
#include
# define N 10
Int a [N].
int i;
Int j;
Int temp ();
Int main ()
{
Temp ();
system("pause");
return 0;
}
Int temp ()
{
for (i=0; i{
Scanf_s (" % d ", & amp; A [I]);//it's the wrong line
}
printf("\n");
for (j=0; J{
for (i=0; i{
If (a [I] & gt; A [I + 1])
{
Int t=a, [I].
A [I]=a, [I + 1].
A [I + 1]=t;
}
}
}
for (i=0; i{
Printf (" % d ", a [I]);
}
return 0;
}

CodePudding user response:

reference jyxuan94 reply: 3/f
first of all, your child function, three incoming isn't necessary, all incoming values are not used
 
#include
#include
# define N 10
Int a [N].
int i;
Int j;
Int temp ();
Int main ()
{
Temp ();
system("pause");
return 0;
}
Int temp ()
{
for (i=0; i{
Scanf_s (" % d ", & amp; A [I]);//it's the wrong line
}
printf("\n");
for (j=0; J{
for (i=0; i{
If (a [I] & gt; A [I + 1])
{
Int t=a, [I].
A [I]=a, [I + 1].
A [I + 1]=t;
}
}
}
for (i=0; i{
Printf (" % d ", a [I]);
}
return 0;
}

Thank you thank you bosses

CodePudding user response:

reference jyxuan94 reply: 3/f
first of all, your child function, three incoming isn't necessary, all incoming values are not used
 
#include
#include
# define N 10
Int a [N].
int i;
Int j;
Int temp ();
Int main ()
{
Temp ();
system("pause");
return 0;
}
Int temp ()
{
for (i=0; i{
Scanf_s (" % d ", & amp; A [I]);//it's the wrong line
}
printf("\n");
for (j=0; J{
for (i=0; i{
If (a [I] & gt; A [I + 1])
{
Int t=a, [I].
A [I]=a, [I + 1].
A [I + 1]=t;
}
}
}
for (i=0; i{
Printf (" % d ", a [I]);
}
return 0;
}

Elder brother, why this program only ordering the first two
Not a whole array of sort?
  • Related