-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_perfect_square.c
21 lines (19 loc) · 985 Bytes
/
ft_perfect_square.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_perfect_square.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgessa <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/28 23:50:51 by mgessa #+# #+# */
/* Updated: 2018/12/01 01:45:42 by mgessa ### ########.fr */
/* */
/* ************************************************************************** */
int ft_perfect_square(int nb)
{
int c;
c = 0;
while (c * c < nb)
c++;
return (c);
}