[ create a new paste ] login | about

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

C, pasted on Nov 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<stdio.h>
#include<math.h>
int main()
{
	const double PI=3.14159265;
	double X;
	int k;

	printf(" k : X \n");
	for(k=1;k<=30;k++)
	{
		X=pow(pow(16.0/(k*PI),2.0),2.0);
		printf("%2i : %f \n",k,X);
	}
}
	


Output:
 k : X 
 1 : 672.791416 
 2 : 42.049464 
 3 : 8.306067 
 4 : 2.628091 
 5 : 1.076466 
 6 : 0.519129 
 7 : 0.280213 
 8 : 0.164256 
 9 : 0.102544 
10 : 0.067279 
11 : 0.045953 
12 : 0.032446 
13 : 0.023556 
14 : 0.017513 
15 : 0.013290 
16 : 0.010266 
17 : 0.008055 
18 : 0.006409 
19 : 0.005163 
20 : 0.004205 
21 : 0.003459 
22 : 0.002872 
23 : 0.002404 
24 : 0.002028 
25 : 0.001722 
26 : 0.001472 
27 : 0.001266 
28 : 0.001095 
29 : 0.000951 
30 : 0.000831 

Exited: ExitFailure 15


Create a new paste based on this one


Comments: