{
scanf("%d ",& ampa[I]);
if(getchar()=='\n ')
Break;
}
In this way, you can store the input numbers into the array one by one. After typing enter \n, it means that the input is over (it can also be changed to something else). After that, the value of i+ 1 is the number you enter.