//
#include <stdio.h>
#include <stdlib.h>
//

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

//
int     main(int argc, char **argv)
{       
        if(argc < 3)
        {
                printf("type 2 numbrs\n");
                return 1;
        }

        int     nb1;
        int     nb2;
        int     for_segmentation1;
        int     for_segmentation2;
        int     *ptr1;
        int     *ptr2;

        ptr1 = &for_segmentation1;
        ptr2 = &for_segmentation2;

        nb1 = atoi(argv[1]);
        nb2 = atoi(argv[2]);

        ft_div_mod(nb1, nb2, ptr1, ptr2);
        printf("%d / %d = %d", nb1, nb2, *ptr1);
        printf("%d %% %d = %d", nb1, nb2, *ptr2);

        return 0;
}

Embed on website

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