This commit is contained in:
2026-02-09 03:43:16 +01:00
parent 5082f62e59
commit d6eecf0cee
8 changed files with 143 additions and 20 deletions
+4 -3
View File
@@ -23,7 +23,8 @@ char *my_itoa(int value){
int taille = get_number_length(value);
char *rslt = malloc(taille + 1 * sizeof(char));
if (rslt == NULL) return NULL;
if (value < 0){
value = value * -1;
*rslt = '-';
@@ -46,7 +47,7 @@ char *my_itoa(int value){
return rslt;
}
/*
int main(){
printf("TESTS 1 \n");
printf("%i\n", get_number_length(7)); //1
@@ -66,4 +67,4 @@ int main(){
printf("%s\n", rslt);
free(rslt);
}
}*/