[ create a new paste ] login | about

Link: http://codepad.org/cxjTtaq5    [ raw code | output | fork ]

C++, pasted on May 25:
#include <math.h>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

int main() {

double N = 25;
double val = 0.0;
double _t = asin(val);

int i;

for (i=0; i<100; i++) {
std::cout << sin(_t)*N << '\n';
_t+=0.1;

}


}


Output:
0
2.49584
4.96673
7.38801
9.73546
11.9856
14.1161
16.1054
17.9339
19.5832
21.0368
22.2802
23.301
24.089
24.6362
24.9374
24.9893
24.7916
24.3462
23.6575
22.7324
21.5802
20.2124
18.6426
16.8866
14.9618
12.8875
10.6845
8.3747
5.98123
3.528
1.03952
-1.45935
-3.94364
-6.38853
-8.76958
-11.063
-13.2459
-15.2964
-17.1942
-18.9201
-20.4569
-21.7894
-22.9041
-23.7901
-24.4383
-24.8423
-24.9981
-24.9041
-24.5613
-23.9731
-23.1454
-22.0864
-20.8067
-19.3191
-17.6385
-15.7817
-13.7671
-11.6151
-9.34692
-6.98539
-4.55406
-2.07724
0.420348
2.91373
5.378
7.78853
10.1212
12.3528
14.461
16.4247
18.2242
19.8417
21.2609
22.4677
23.45
24.198
24.7042
24.9636
24.9735
24.734
24.2472
23.5183
22.5543
21.365
19.9622
18.3599
16.5742
14.6229
12.5255
10.303
7.97746
5.57225
3.11136
0.619386
-1.87878
-4.35817
-6.79402
-9.16198
-11.4384


Create a new paste based on this one


Comments: