I still have a kind of want to idea is to use the
Int I=0;
While (the scanf (" % d ", a [I])!=(EOF)
{
i++;
}, but it can't stop, want to finish with CTRL + z, there are no '\ n' end? Guide for bosses,
CodePudding user response:
Reference:# include & lt; Stdio. H>
Int main ()
{
Int a [100], I=0, j.
While ((the scanf (" % d ", & amp; A [i++])==1) & amp; & ((getchar ())!='\ n'));
//method one: to enter as a terminator, finally enter there can be no Spaces in front of the
//while (the scanf (" % d ", & amp; A [I])==1 & amp; & a[i]!=0) {i++; }
//method 2: to zero or other digital as the terminator, the input end of the
For (j=0; JPrintf (" % d ", a [j]);
return 0;
}