40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jtorrez- <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/03/18 20:15:26 by jtorrez- #+# #+# */
|
|
/* Updated: 2023/03/18 20:21:42 by jtorrez- ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
void rush(int x, int y);
|
|
int ft_atoi(char *str);
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int width;
|
|
int height;
|
|
|
|
if (argc != 3)
|
|
return (1);
|
|
width = ft_atoi(argv[1]);
|
|
height = ft_atoi(argv[2]);
|
|
rush(width, height);
|
|
return (0);
|
|
}
|
|
|
|
int ft_atoi(char *str)
|
|
{
|
|
int i;
|
|
int number;
|
|
|
|
i = 0;
|
|
number = 0;
|
|
while (str[i] >= '0' && str[i] <= '9')
|
|
number = number * 10 + (str[i++] - '0');
|
|
return (number);
|
|
}
|