0
Can someone help please? I don't know where i went wrong.
10 ответов
+ 9
various mis-capitalisation, printf format incorrect in last two usages, missing ; , missing #include <math.h>, also void main() instead of int main()
+ 8
@john, not my code :) But yes, this is c.
Feel free to continue improvements for Park :) There maybe other errors I did not pick up on
+ 2
Based on coding style I'm guessing you want C not C++. Otherwise, you shouldn't use .h includes as C++ doesn't use them anymore.
+ 2
Our teacher wrote this code and she insisted that everything is correct and it'd work if we wrote it like that using C++. Thank you all for ur help. ^^
+ 1
My C code runs. Must enter 5. for float scanf to work.
https://code.sololearn.com/c3W9zCLMGGqA/
+ 1
Oh okay, thanks a lot!! I wasn't interested in this coding thing tbh if it wasn't for my studies, but it's really interesting! I'll keep learning with this app and i hope u'll help me more in the future 😁 thanks again! 😃
0
@jay you're reading floats (%f) in ints (int a,b,c).
0
If you want to have an actual two way conversation, please join us here. I have a few people I teach or help with their projects via DM (direct message.)
https://www.sololearn.com/Discuss/689391/?ref=app
- 1
Either she or you made a mistake. scanf %f is a format for floating point input and your variables were integers. Depending on which compiler it might run, but you won't get the values you expected as 32 bit integers aren't stored anything like 32 bit floats.
The capitalization might have been automatically done as you inputted the lines. My phone does it to me.