fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. int timeInterval; float multiplier=40.0f; int scale = 4; int variance=9;
  7. float circleInt; float seed = 5.0f; int offset = 30; float x;
  8.  
  9. for (int i=0;i<100;i++) {
  10. x = static_cast<float>(i);
  11. circleInt = static_cast<float>(i%variance);
  12. timeInterval = static_cast<int>(offset + multiplier*(1 + cos(seed+circleInt+sin((x+circleInt*x)))));
  13. cout << timeInterval <<endl;
  14. }
  15.  
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
81
102
106
85
34
33
38
88
100
95
102
64
93
33
59
37
109
82
52
109
106
39
34
32
36
75
75
107
97
109
43
59
30
36
106
85
44
81
72
96
59
62
37
70
103
106
89
88
78
34
33
38
106
109
59
107
108
34
33
63
40
75
105
87
106
93
60
34
30
43
109
104
90
100
69
100
31
33
47
88
109
56
108
109
58
55
58
52
108
104
107
105
108
34
62
33
58
103
86
43