#include <math.h> #include <stdio.h> int main( void ) { double x, r, y1, y2, y3; printf( " x sin( x ) cos( x ) tan( x )\n" ); for ( x = 0.0; x <= 180.0; x = x+15.00 ) { r = x * 3.14159 / 180.0; y1 = sin( r ); y2 = cos( r ); y3 = tan( r ); printf( "%6.2f %12.5f %12.5f %12.5f\n", x, y1, y2, y3 ); } return 0; }
▼戻る▼
「初心者のためのポイント学習C言語」 Copyright(c) 2000-2004 TOMOJI All Rights Reserved