久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      c語言fabs是什么意思

      c語言fabs是什么意思

      c語言fabs是什么意思?

      fabs函數(shù)是一個求絕對值的函數(shù),求出x的絕對值,和數(shù)學上的概念相同,函數(shù)原型是extern float fabs(float x),用法是#include <math.h>。

      推薦學習:c語言視頻教程

      fabs()函數(shù)的聲明:double fabs(double x)。其中參數(shù)x 是浮點值,這個函數(shù)返回x的絕對值。代碼示例如下:

      int main (){ int a, b; a = 1234; b = -344; printf("The absolute value of %d is %lf", a, fabs(a)); printf("The absolute value of %d is %lf", b, fabs(b)); return(0);}

      編譯和運行上面的程序,這將產(chǎn)生以下結果:

      The absolute value of 1234 is 1234.000000 The absolute value of -344 is 344.000000

      c語言fabs是什么意思

      擴展資料:

      fabs()和abs()區(qū)別:

      (1)參數(shù)對象不同

      abs()是對整數(shù)取絕對值, 而fabs()是對浮點數(shù)取絕對值。

      (2)函數(shù)原型不同:

      int abs(int x) double fabs(double x)

      (3)頭文件不同:

      abs(): #include <stdlib.h> fabs(): #include <math.h>

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號