fork(1) download
  1. #include <iostream>
  2.  
  3. int main() {
  4. double const pi = 3.14; // oder auch gern genauer
  5. double const step = 2.0 * pi / 60.0;
  6. double const start = -pi;
  7. for (int i = 0; i <= 60; i++) {
  8. double const x = start + step * i;
  9. std::cout << x << "\n";
  10. }
  11. }
  12.  
Success #stdin #stdout 0s 4388KB
stdin
Standard input is empty
stdout
-3.14
-3.03533
-2.93067
-2.826
-2.72133
-2.61667
-2.512
-2.40733
-2.30267
-2.198
-2.09333
-1.98867
-1.884
-1.77933
-1.67467
-1.57
-1.46533
-1.36067
-1.256
-1.15133
-1.04667
-0.942
-0.837333
-0.732667
-0.628
-0.523333
-0.418667
-0.314
-0.209333
-0.104667
0
0.104667
0.209333
0.314
0.418667
0.523333
0.628
0.732667
0.837333
0.942
1.04667
1.15133
1.256
1.36067
1.46533
1.57
1.67467
1.77933
1.884
1.98867
2.09333
2.198
2.30267
2.40733
2.512
2.61667
2.72133
2.826
2.93067
3.03533
3.14