int main(void) { for(int i = 0; i < 10; i++) { srand((i+1) * 13); for(int x = 0; x < 10; x++) count[x] = 0; for(int i = 0; i < 1000; i++) countnum(rand() % 10); for(int i = 0; i < 10; i++) printf("%4d", i+1); putchar('\n'); for(int i = 0; i < 10; i++) printf("%4d", count[i]); putchar('\n'); } return 0; }
int main() { //LOCAL DECLARATION int i; // This controls the first for loop int data[AMOUNT] = {0,0,0}; //This array hold the data entered by the user int datatype[AMOUNTS] = {0,0,0}; //This array holds the number of each digit in each data entered by the user // EXECUTABLE STATEMENT for (i = 0; i < AMOUNT; i++) { data[i] = getInput(i); } for (i = 0; i < AMOUNT; i++) { countnum(i, datatype , data[i]); } printfriend(data, datatype); return(0); }