Skip to content
Snippets Groups Projects
utils.c 351 B
Newer Older
Ukhanov Ilya's avatar
Ukhanov Ilya committed
#include <stdio.h>
#include <stdlib.h>
#include "utils.h"

void affichertab(long* T, int s){
    printf("[ ");
    for(int i = 0; i < s-1; i++){
        printf("%d , ",T[i]);
    }
    printf("%d ]\n",T[s-1]);
}

void genTab(long* T, long taille, long MAX) {
  // Generer le tableau
  for(long i = 0; i < taille; ++i) {
    T[i] = rand() % MAX;
  }
}