34 lines
1.2 KiB
C
34 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2021/08/16 13:53:07 by gbaconni #+# #+# */
|
|
/* Updated: 2021/08/16 13:55:59 by gbaconni ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
void ft_putnbr_base(int nbr, char *base);
|
|
|
|
int main(void)
|
|
{
|
|
char base[32];
|
|
int nb;
|
|
|
|
printf("Input Number: ");
|
|
scanf("%d", &nb);
|
|
printf("Input Base [31]: ");
|
|
scanf("%s", base);
|
|
ft_putnbr_base(nb, base);
|
|
write(1, "\n", 1);
|
|
printf("nb=%d base=%s (ft_putnbr_base)\n", nb, base);
|
|
return (0);
|
|
}
|