move here
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_rev_int_tab.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: lfirmin <[email protected]> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/15 07:38:23 by lfirmin #+# #+# */
|
||||
/* Updated: 2024/02/15 08:32:37 by lfirmin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
void ft_rev_int_tab(int *tab, int size)
|
||||
{
|
||||
int temp;
|
||||
int start;
|
||||
int end;
|
||||
|
||||
end = size - 1;
|
||||
start = 0;
|
||||
while (start < end)
|
||||
{
|
||||
temp = tab[start];
|
||||
tab[start] = tab[end];
|
||||
tab[end] = temp;
|
||||
start++;
|
||||
end--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user