Add FramaC TDM

This commit is contained in:
Yorick Barbanneau 2023-04-30 21:36:12 +02:00
parent 713e8d12c4
commit 56e86b4b20
9 changed files with 606 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#include "max_dist.h"
int max_dist(int *tab, unsigned int n)
{
int min = tab[0];
int max = tab[0];
unsigned int i = 1;
while (i < n)
{
if (tab[i] < min)
min = tab[i];
if (tab[i] > max)
max = tab[i];
i++;
}
return max - min;
}