Hey I have made a program that prints out 100 random numbers, but the numbers are printed in a long list. I want the output to be in 5 columns of 20 numbers each column, I've tried various ways and the output would always be an endless loop. ( I've used a for loop ) the code here is a full working code with the long list. Please help :/

Code:
#include <stdio.h>#include <stdlib.h>
#include <time.h>


int main(void){
	
  int counter,ascending,sort,search;
  int files[100];
   
 
  printf("Random file numbers\n");
 
	srand(time(NULL));
	for(counter=0;counter<100;counter++){
    files[counter] = rand()%9999+1;
	printf("%d\n", files[counter]);
  }
I think this part of the code is enough rather than the whole code which is too long.