#include <stdio.h>

int	ft_sqrt(int nb)
{
	int	i;
	int	result;

	i = 0;
	result = 0;
	if (nb < 0)
		return (0);
	while (result < nb && i <= 46340)
	{
		result = i * i;
		if (result == nb)
			return (i);
		i++;
	}
	return (0);
}

int	main(void)
{
	int	nb;

	nb = 2147302921;
	printf("%d", ft_sqrt(nb));
	return (0);
}

Embed on website

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