+ 3

How can I mention that there is a fault in a cours in solo?

https://code.sololearn.com/cI8RaYy17Xrz/?ref=app

8th Sep 2019, 8:23 PM
Hadjer
Hadjer - avatar
6 Answers
+ 4
Report it to Sololearn via the in-app feature or send an email at info@sololearn.com
8th Sep 2019, 8:25 PM
Jella
Jella - avatar
+ 4
can you explain where is the fault
8th Sep 2019, 10:05 PM
ABADA S
ABADA S - avatar
+ 3
You have used wrong format specifier which results in wrong output. Change %d to %f and it will be Ok.
8th Sep 2019, 10:11 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 3
ABADA S first, logically 23.678901*4 =! 1958230209 in theout put. And 23.678901 is not an integer so we need to put %f to display the result of 4*23.678901 instead of %d
9th Sep 2019, 9:06 PM
Hadjer
Hadjer - avatar
+ 3
AnonymousGuy yes I know , that's technically true but my goal is to have right unswer for the multiplication why I would print a false result ? . I'm sure this will confuse lot of people especially beginners like me, that's why we must change it to %f in the course
10th Sep 2019, 7:45 PM
Hadjer
Hadjer - avatar
+ 1
Hadjer😁 Yes, you are right..23.678901 is not an integer but it is not like that you cannot print it using %d..you can use any format specifier..(obviously output will depend upon format specifier)
10th Sep 2019, 3:35 PM
Alaska
Alaska - avatar