#include <stdio.h> #include <stdlib.h> // modify this to store using malloc... int main(int argc, char *argv[]) { int howMany; scanf("%d", &howMany); if (howMany > 10000) { printf("Don't use this program for that large of an input. Exiting\n"); exit(0); } int nums[howMany]; int i; for(i=0; i < howMany; i++) { if (scanf("%d", &(nums[i])) != 1) { printf("Error reading - no more numbers\n"); break; } } printf("Read in %d many numbers\n", i); return 0; }