Error using pow (a, b)

-1
#include <stdio.h>
#include<math.h>

int main() {

double pi = 3.14159;
double R, A;

scanf("%lf", &R);
A = (pi)* pow(double R, int 2);
printf("%lf\n", A);

return 0;
}

This code is returning the error: Too few arguments to function 'pow' Why?

    
asked by anonymous 10.01.2017 / 04:41

1 answer

1

Try calling the function as follows:

A = pi * pow(R, 2);

and see if the error persists.

The parenthesis in pi is not necessary (but also does not cause error), the error was because you were invoking the function with the data types, which is not necessary

    
10.01.2017 / 04:58