project in school 42
create a function that imitates printf
in <stdio.h>
pass with 111 / 115 (deepthought gave me 112)
This works with the following flags :
-
+
(space) #
0
The precision .
The *
The length l
ll
h
hh
and the following conversions :
cspdiuxX%nf
In fact, there were some faults for %f
, but deepthought still accepted this, so it'll probably accept different answers caused by floating error in C (more information : search IEEE-754).
Hence, don't be afraid to try out %f
%g
and %e
(I regret that I didn't submit %g
and %e
because they didn't pass some online testers, deepthought can be less strict than that)
Good luck for this project :)
If there are any advices or questions, please contact [email protected]