03 Bonus done

This commit is contained in:
David Gailleton
2025-12-08 12:56:39 +01:00
parent 87c20da714
commit ea1cd04500
3 changed files with 260 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/07 12:53:07 by dgaillet #+# #+# */
/* Updated: 2025/12/07 17:43:45 by dgaillet ### ########lyon.fr */
/* Updated: 2025/12/08 11:08:38 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -38,7 +38,7 @@ int main(void)
first = temp;
while (temp[i + 2])
{
if ((temp[i] - '0') > (first[0] - '0'))
if (temp[i] > first[0])
first = &temp[i];
i++;
}
@@ -46,7 +46,7 @@ int main(void)
second = first + 1;
while (first[i + 1])
{
if ((first[i] - '0') > (second[i] - '0'))
if (first[i] > second[0])
second = &first[i];
i++;
}