aboutsummaryrefslogtreecommitdiff
path: root/c01/ex04/ft_ultimate_div_mod.c
blob: a2745fa3048cc48f60614383f01a247f47f61929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_ultimate_div_mod.c                              :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <charles.cabergs@gmail.com>       +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2019/07/03 17:54:22 by cacharle          #+#    #+#             */
/*   Updated: 2019/07/03 18:17:03 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

void	ft_ultimate_div_mod(int *a, int *b)
{
	int	div_tmp;
	int	mod_tmp;

	div_tmp = *a / *b;
	mod_tmp = *a % *b;
	*a = div_tmp;
	*b = mod_tmp;
}