20130711【C言語】平方根を求める
お題
10の平方根を求める
ソース
#include <stdio.h>
#include <math.h> /* sqrt()を使うために必要 */
int main(void)
{
double answer;
answer = sqrt(10.0);
printf("%f", answer);
return 0;
}
実行結果
3.162278
お題
10の平方根を求める
ソース
#include <stdio.h>
#include <math.h> /* sqrt()を使うために必要 */
int main(void)
{
double answer;
answer = sqrt(10.0);
printf("%f", answer);
return 0;
}
実行結果
3.162278