正在加载图片...
引例 sin( x) ●计算函数值y x≠0 x=0 include stdio. h" include "math. h 输入x main o x=0? float x, yi Y printf ("input x: \ n") scanf(of &x)i SIX/X if(x!=0.0) sin(x)/xi 输出y else printf("y f", y)i 电子科技大学通信与信息工程学院电子科技大学通信与信息工程学院 引例 ⚫ 计算函数值:      =  = 1 0 0 sin( ) x x x x y 输入x X=0? Y N y = 1 y = six/x 输出y #include "stdio.h" #include "math.h" main() { float x, y; printf("input x:\n"); scanf("%f", &x); if (x != 0.0) y = sin(x)/x; else y = 1; printf("y = %f", y); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有