实现 #include <iostream> int main() { const float stepsize = 0.3; for (int i = 0; i <= 100 / stepsize; ++i) { const double a = i * stepsize; std::cout << a << std::endl; } }