#include <unistd.h>

int	ft_check1(char *str, char c, int pos)
{
	int	i;

	i = 0;
	while (i < pos)
	{
		if (c == str[i])
			return (0);
		i++;
	}
	return (1);
}

int	ft_check2(char *str, char c)
{
	int	i;

	i = 0;
	while (str[i])
	{
		if (c == str[i])
			return (0);
		i++;
	}
	return (1);
}

int	main(int argc, char **argv)
{
	int	i;

	i = 0;
	if (argc == 3)
	{
		while (argv[1][i])
		{
			if (ft_check1(argv[1], argv[1][i], i))
				write(1, &argv[1][i], 1);
			i++;
		}
		i = 0;
		while (argv[2][i])
		{
			if (ft_check2(argv[1], argv[2][i]))
			{
				if (ft_check1(argv[2], argv[2][i], i))
					write(1, &argv[2][i], 1);
			}
			i++;
		}
	}
	write(1, "\n", 1);
	return (0);
}

Embed on website

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