+ 1

How should i use the string for this C code?

I just tried to solve this code coach challenge, but i stumbled about how should i manipulate the string to give the value. Btw this code always give output 0. Here is the code: https://sololearn.com/compiler-playground/cFr1UQJ2VPIa/?ref=app Can anyone help me with this?

22nd Dec 2023, 6:46 AM
Celvien Kurniawan
Celvien Kurniawan - avatar
2 Answers
+ 6
Celvien Kurniawan , the compiler is throwing errors about: > to compare strings `==` does not work as expected. we can use strcmp() instead. > to use printf() with a float, `%d` is not correct. we can use `%f`. > keep in mind that the *input arguments* in this case has to be done in the way to put each of them in a new line.
22nd Dec 2023, 7:02 AM
Lothar
Lothar - avatar
0
Hi
22nd Dec 2023, 2:56 PM
Inam ashraf
Inam ashraf - avatar