prog.c:7:31: error: unknown type name 'n'
double computeSine(double x, n);
^
prog.c: In function 'main':
prog.c:19:3: error: 'n' undeclared (first use in this function)
n = atoi(argv[2]);
^
prog.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
prog.c:21:12: warning: implicit declaration of function 'computeSine' [-Wimplicit-function-declaration]
result = computeSine(x, n , 10);
^
prog.c:22:10: warning: format '%d' expects argument of type 'int', but argument 3 has type 'double' [-Wformat=]
printf("sin(%lf) = %d\n", x, result);
^
prog.c: At top level:
prog.c:38:8: error: conflicting types for 'computeSine'
double computeSine(double x, int n){
^
prog.c:21:12: note: previous implicit declaration of 'computeSine' was here
result = computeSine(x, n , 10);
^
prog.c: In function 'computeSine':
prog.c:41:3: error: expected ',' or ';' before 'int'
int i=0;
^
prog.c:42:7: error: 'i' undeclared (first use in this function)
for(i=0; i<n; i++){
^
prog.c:43:46: warning: implicit declaration of function 'fcat' [-Wimplicit-function-declaration]
double term = pow(-1,i) * (pow(x, 2*i+1)/fcat(2*i+1));
^
prog.c:44:5: error: 'Result' undeclared (first use in this function)
Result += term;
^
prog.c:46:3: warning: 'return' with no value, in function returning non-void
return ;
^
prog.c:40:10: warning: unused variable 'result' [-Wunused-variable]
double result = 0.0
^