int i,a[10]; for(i=0 ; i<n ; i++) { scanf("%d",&a[i]); } There are many many code snippets for C online. Whatever you want to do, someone has done it already.
You can ask a new question or answer this question.