for me it looks reasonable, because it works! now for me good is what works and if there are some mistakes i would like to hear what mistakes i have made.
i would like to hear what mistakes i have made.
You need to go all the way back to the basics, and learn the difference between integers and floats. 60.0 is NOT in int value.
i know that it is not in int value and i knew it when i typed it there, i think i did it because programm did not work correctly and after that it worked, i wondered why compiler did not said anything about it.
i don't know all basics, so how far i am it's only how much i am read on web and some four years ago writed simple code for line follower robot and two years ago did pascal studies at school.
i changed from int i = 60.0 to float i = 60.0
Please be wary of believing that because a program runs with a limited set of input and conditions, it will perform correctly with other inputs and/or conditions.
On your most lucky day, all of your errors - even microscopic ones - will cause crashes. ![]()
ardonis:
i know that it is not in int value and i knew it when i typed it there, i think i did it because programm did not work correctly and after that it worked, i wondered why compiler did not said anything about it.
The compiler might have issued a warning, if warnings were enabled, which they are not. Also some things are simply allowed, such as assignment between different types, depending on what the types are exactly.