38 lines
386 B
C
38 lines
386 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int n,i,j;
|
|
int array[n];
|
|
int *ptr = array;
|
|
|
|
|
|
printf("Enter the size of the array: ");
|
|
scanf("%d", &n);
|
|
|
|
for(i=0;i<n;i++)
|
|
{
|
|
printf("Please enter the %d number: ",i+1);
|
|
scanf("%d",(ptr+i));
|
|
|
|
}
|
|
|
|
|
|
|
|
for(j=0;j<n;j++)
|
|
{
|
|
printf("The %d. number is %d \n",j+1,*(ptr+j));
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |