# Include <stdio. h>
# Include <stdlib. h>
# Include <iostream>
Using namespace STD;
Void main ()
{
Int m_array [10]; // defines a 10-bit long integer array.
Int length; // used to record the length of an array
Char c = ''; // define a character to determine whether the user presses the carriage return.
Cout <"Enter the number, number less than or equal to 10, and end with the Enter key" <Endl;
For (INT I = 0; I <10; I ++)
{
C = cin. Peek (); // obtain the user's key (read a character, but not from the response stream). Do not use cin. Get () here ()
If (C = '\ n') // determines whether the user presses the carriage return. If yes, the output starts when the loop ends.
{
Break;
}
Cin> m_array [I];
Length = I + 1;
}
Cout <"you entered a total of" <length <"Number" <Endl;
For (INT I = 0; I <length; I ++) // start output
{
Cout <m_array [I] <"";
}
Cout <Endl;
System ("pause ");
}