Removed some stupid .part file and added such files to .gitignore
[mirrors/Programs.git] / c / pic / main.cpp
1 #include <stdio.h>
2 #include <math.h>
3 #include <time.h>
4 #define PI 3.141592653589793
5
6 int main(void) {
7 double currPi=0, i=1;
8 clock_t begin, end;
9
10 begin = clock();
11 do {
12 currPi+=(4/i - 4/(i+2));
13 i+=4;
14 } while(fabs(PI-currPi) > 1e-7);
15 end = clock();
16
17 printf("Vypocteno Pi = %lf v case: %f ms.\n", currPi,
18 (float)(end-begin)/CLOCKS_PER_SEC * 1000);
19
20 //system("PAUSE");
21 //return EXIT_SUCCESS;
22 }
This page took 0.358859 seconds and 4 git commands to generate.