I am trying to add double numbers which begin with 0.5,0.6... to 179.9,180.0. To do it, I used the following code;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
for (double i = 1; i <= 180; i+=0.1) {
listDegrees->Items->Add(i);
}
}
but when I run the program, it shows something like this:
How can I minimize the number only two precision?
edited:
I have a project for my school. We will do some activities with electronic circuits so that, when I choose a coordinate from program, electronic circuit will turn right/left/down or up. So that I need this.
the program should be windows application to be useful for all people. the screenshot from the program is like that; https://i.stack.imgur.com/sUHg7.png
so far all code I have is I have shared before. I guess, I have to edit ListBox1->Items->Add(i); part of my code to deal with this problem.