Fix bug trailing comma
This commit is contained in:
parent
f93d4ace8d
commit
fcf105609b
|
@ -1,12 +1,12 @@
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* ft_print_reverse_alphabet.c :+: :+: :+: */
|
/* ft_print_comb2.c :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/03/15 21:50:37 by tischmid #+# #+# */
|
/* Created: 2023/03/15 21:50:37 by tischmid #+# #+# */
|
||||||
/* Updated: 2023/03/16 05:00:01 by tischmid ### ########.fr */
|
/* Updated: 2023/03/24 01:42:43 by tischmid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ void print_a_and_b(int a, int b)
|
||||||
{
|
{
|
||||||
char a_tenth;
|
char a_tenth;
|
||||||
char b_tenth;
|
char b_tenth;
|
||||||
|
char old_a;
|
||||||
|
|
||||||
|
old_a = a;
|
||||||
a_tenth = digit_to_char(a / 10);
|
a_tenth = digit_to_char(a / 10);
|
||||||
a = digit_to_char(a % 10);
|
a = digit_to_char(a % 10);
|
||||||
b_tenth = digit_to_char(b / 10);
|
b_tenth = digit_to_char(b / 10);
|
||||||
|
@ -31,7 +33,7 @@ void print_a_and_b(int a, int b)
|
||||||
write(1, " ", 1);
|
write(1, " ", 1);
|
||||||
write(1, &b_tenth, 1);
|
write(1, &b_tenth, 1);
|
||||||
write(1, &b, 1);
|
write(1, &b, 1);
|
||||||
if (a != 98)
|
if (old_a != 98)
|
||||||
{
|
{
|
||||||
write(1, ", ", 2);
|
write(1, ", ", 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue