Код: Выделить всё
for (int i = 0; i < 1001; i++)
{
double step = i / 1000.0;
// do some math here
}
Код: Выделить всё
double step = i / 1000.0;
Код: Выделить всё
double step = i * 0.001;
Подробнее здесь: https://stackoverflow.com/questions/865 ... operations
Мобильная версия