Home > Back-end >  Don't know what to do, and hope to give an answer, I'm learning how to learn.
Don't know what to do, and hope to give an answer, I'm learning how to learn.

Time:04-26

CodePudding user response:

Reference:
 # include 
# define N 50

Int main ()
{
Int a [N], * p=a, I=0;
While (the scanf (" % d ", & amp; A [i++])!=EOF & amp; & iFor (p=p + I - 2; p>=a; P -)
printf("%d ",*p);
printf("\n");

return 0;
}

CodePudding user response:

reference 1st floor QZJHJXJ response:
for reference:
 # include 
# define N 50

Int main ()
{
Int a [N], * p=a, I=0;
While (the scanf (" % d ", & amp; A [i++])!=EOF & amp; & iFor (p=p + I - 2; p>=a; P -)
printf("%d ",*p);
printf("\n");

return 0;
}

Why always display format error, should I not wrong

CodePudding user response:

refer to the second floor m0_53683570 response:
Quote: refer to 1st floor QZJHJXJ response:
for reference:
 # include 
# define N 50

Int main ()
{
Int a [N], * p=a, I=0;
While (the scanf (" % d ", & amp; A [i++])!=EOF & amp; & iFor (p=p + I - 2; p>=a; P -)
printf("%d ",*p);
printf("\n");

return 0;
}

Why always display format error, I should have no dozen wrong
format error, should be grammatically incorrect, the upper left corner duplicate code, paste it to the compiler to see,

CodePudding user response:

reference QZJHJXJ reply: 3/f
Quote: refer to the second floor m0_53683570 response:
Quote: refer to 1st floor QZJHJXJ response:
for reference:
 # include 
# define N 50

Int main ()
{
Int a [N], * p=a, I=0;
While (the scanf (" % d ", & amp; A [i++])!=EOF & amp; & iFor (p=p + I - 2; p>=a; P -)
printf("%d ",*p);
printf("\n");

return 0;
}

Why always display format error, I should have no dozen wrong
format error, should be grammatically incorrect, the upper left corner duplicate code, paste it to look at in the compiler,

The compiler why after input the digital line feed him no output? Is not out of circulation? ,, don't know why not to come out,

CodePudding user response:

After input the number, want to quit, press CTRL + Z key, then press enter,

CodePudding user response:

 # include & lt; stdio.h> 

# define N 5

Int main (void)
{
Int a [N], * p=a;
While (p & lt; A + N) the scanf (" % d ", p + +);
While (- p & gt;=a) printf (" % d ", * p).
}

CodePudding user response:

 1 2 3-2-6 ^ Z 
- 6-2 3 2 1
Please press any key to continue...

CodePudding user response:

refer to 6th floor all ling rat man replies:
 # include & lt; stdio.h> 

# define N 5

Int main (void)
{
Int a [N], * p=a;
While (p & lt; A + N) the scanf (" % d ", p + +);
While (- p & gt;=a) printf (" % d ", * p).
}

The forehead, compile error,,

CodePudding user response:

 # include & lt; stdio.h> 

# define N 250

Int main (void)
{
Int a [N], * p=a;

While (p & lt; A + N & amp; & The scanf (" % d ", p++)==1)
;
P -;
While (- p & gt;=a) printf (" % d ", * p).
}

For your reference ~

Terminate input, LINUX, use CTRL + d under Windows with CTRL + z

CodePudding user response:

 # include & lt; stdio.h> 

# define N 5

Void woo (int a [])
{
Static int g=0;

If (g + + & lt; N) the scanf (" % d ", a), woo (a + 1);
The else return;

Printf (" % d ", a);
}

Int main (void)
{
Woo ((int) [N] {0}).//need to use the compiler support for C99
}
  • Related