zoukankan      html  css  js  c++  java
  • cabs函数

    函数简介
      函数名: cabs(_cabs)   
        功 能: 计算复数的绝对值   
        所属库:math.h  
       用 法: double _cabs(struct _complex z);  
       参数说明:   struct _complex 定义在math.h下   
        struct _complex {  
             double x,y;   
                          } ;
    程序示例
      #include <stdio.h>
      #include <math.h>
      int main(void)   
      {   
      struct complex z;  
     double val;
     z.x = 2.0;  
     z.y = 1.0;  
     val = cabs(z);  
     printf("The absolute value of %.2lfi %.2lfj is %.2lf", z.x, z.y, val);   return 0;   }   
    下面的例子来自MSDN[1]   
    #include <math.h>   
    #include <stdio.h>   
    int main( void )   
    {   struct _complex number = { 3.0, 4.0 };
      double d;  
       d = _cabs( number );
      printf( "The absolute value of %f + %fi is %f\n",number.x, number.y, d);  
    }
  • 相关阅读:
    css--盒子模型
    目标爬取社会信用码
    KFC-位置分页爬虫
    百度翻译-爬虫
    网页采集器-UA伪装
    python模块2
    python模块
    go入门
    python垃圾回收机制
    Python高级用法
  • 原文地址:https://www.cnblogs.com/eagleking0318/p/6521315.html
Copyright © 2011-2022 走看看