Home > Software engineering >  Why after the input array without results output after press enter, the state of the input is still?
Why after the input array without results output after press enter, the state of the input is still?

Time:09-23

#include

Int main ()
{
Int a [5], k;
For (k=0; K & lt; 5; K++)
The scanf (" % d ", & amp; A, [k]).

Int I, j, temp.

for(i=0; I & lt; 5; I++)
{
For (j=I; J & lt; 5; J++)
{
If (a [I] & gt; A [j])
{
Temp=a, [I].
a[i]=a[j];
A [j]=temp;
}
}
}
Printf (" % d % d ", a [0], a [4]);
return 0;
}
This is the code, I use the codeblocks,

CodePudding user response:

I know my problem, the problem is when the input array elements I want to put on a row, separated by a space, but I do can only press the enter key to enter the next element can, this problem can be solved?

CodePudding user response:



Here is the VB, not C plate,

CodePudding user response:

each lost a number, according to a carriage return, lose five,,,

CodePudding user response:

C in the next door, you enter the wrong door,

CodePudding user response:

This is the "ladies"

CodePudding user response:

reference 5 floor zhao4zhong1 reply:
this is the "ladies"


Why do you still run in?

CodePudding user response:

refer to 6th floor Chen8013 response:
Quote: refer to the fifth floor zhao4zhong1 reply:

This is the "ladies"


Why do you still run in?

I just finished surgery yesterday, tomorrow I'm going to get back,

CodePudding user response:

B and C together, you should go to the door,
  • Related