小编The*_*lou的帖子

如何在 C 函数中正确使用 cpow

我正在尝试使用cpowwithr并且我收到一个语法错误,告诉我在r. 阅读文档后,我仍然对我做错了什么感到困惑?

#include <math.h>
#include <complex.h>

float area(double r)
{
    r = (1 - r / 1.83) * 1.25;
    double complex z = cpow(r, .2); // i get an error here on the letter r saying missing colon (;)
    return r;

}




    int main()
    {
        float a,r;

        double radius, sum = 0;
        char continu[20];

        // the body of the loop is executed at least once
        do
        {
            float a,r;

            printf("Enter a number: ");
            printf("enter …
Run Code Online (Sandbox Code Playgroud)

c math function

0
推荐指数
1
解决办法
63
查看次数

标签 统计

c ×1

function ×1

math ×1