<< |
>>
#5605 Dodano: 12-12-2011 12:29. Głosów: -94
#include <stdio.h>
int main(void)
{
float pi = 22/7;
printf("%f",pi);
return 0;
}
i got 3.000000
#include <stdio.h>
int main(void)
{
float pi = 22;
pi /= 7;
printf("%f",pi);
return 0;
}
i got 3.142857
http://cboard.cprogramming.com/cplusplus-programming/56968-standard-pi-constant.html
<< |
>>
int main(void)
{
float pi = 22/7;
printf("%f",pi);
return 0;
}
i got 3.000000
#include <stdio.h>
int main(void)
{
float pi = 22;
pi /= 7;
printf("%f",pi);
return 0;
}
i got 3.142857
http://cboard.cprogramming.com/cplusplus-programming/56968-standard-pi-constant.html