how to use the POW function in C

1

Good afternoon people, I've already arrived here.

#include <stdio.h>
#include <math.h>
int main(void)
{
float val_carro, juros_mensal = juros_mensal / 100, num_parcelas, cf;

printf("\n\n  Digite o valor do carro: "); //entrada variaveis
scanf("%f", &val_carro);
printf("\n  Digite o numero de parcelas: ");
scanf("%f", &num_parcelas);
printf("\n  Digite o juros mensal: ");
scanf("%f", &juros_mensal);

cf = (1 + juros_mensal);
cf = (cf pow num_parcelas);  // calculo coeficiente de financiamento
cf = (1 / cf);
cf = (1 - cf);
cf = (juros_mensal / cf);

printf("\n\n  O valor de cada parcela é: %f", cf); //exibe valor de cada parcela
printf("\n\n  O valor do carro é: %f", cf *= 3); // exibe valor total do carro
return 0;
}

Only in the line that commented the financing coefficient, of the error,

expected ')' before 'num_plots'

So I can not solve this.

    
asked by anonymous 23.05.2016 / 21:04

1 answer

2

The line has a syntax error:

 cf = (pow(cf,num_parcelas)); 

Where:

pow(base, expoente);
    
23.05.2016 / 21:41