#include <stdio.h>

void	ft_div_mod(int a, int b, int *div, int *mod)
{
	*div = a / b;
	*mod = a % b;
}

int	main(void)
{
	int	a;
	int	b;
	int	div;
	int	mod;

	a = 10;
	b = 3;
	ft_div_mod(a, b, &div, &mod);
	printf("Q : %d \n", div);
	printf("R : %d \n", mod);
	return (0);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: