#include <stdio.h>
#include <math.h>
#define MPI 3.14159265358979323846
int main(void)
{
double y;
y = cos(45.0 * MPI / 180.0);
printf("45°のコサイン値 = %f\n", y);
return 0;
}
【実行結果】45°のコサイン値 = 0.707107
▼戻る▼
「初心者のためのポイント学習C言語」 Copyright(c) 2000-2004 TOMOJI All Rights Reserved