20 lines
379 B
C
20 lines
379 B
C
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
puts("Input the number of elements to store in the array: ");
|
|
int arr = 0;
|
|
scanf("%d", &arr);
|
|
int nums[arr] = {};
|
|
|
|
for(size_t j = 0; j < arr; j++) {
|
|
printf("For Element %d enter num!\n", j);
|
|
scanf("%d", nums + j);
|
|
}
|
|
|
|
for(size_t j = 0; j < arr; j++) {
|
|
printf("Element %d = %d\n", j, *(nums + j));
|
|
}
|
|
return 0;
|
|
}
|