Lets break
pow(payMent = loanAmount * monthlyIntrest / (1 - (1 + monthlyIntrest),-loanDuration));
down a bit.
payMent = loanAmount * monthlyIntrest / (1 - (1 + monthlyIntrest),-loanDuration)
is one argument. The comma that should split it into two arguments is inside the brackets. Likely you meant
payMent = loanAmount * monthlyIntrest / (1 - (1 + monthlyIntrest)), -loanDuration
but even this is dodgy. You can put the assignment inside the function call, but why? You gain nothing and lose job opportunities for writing needlessly cryptic-as-smurf code.
The sane programmer writes
payMent = loanAmount * monthlyIntrest / (1 - (1 + monthlyIntrest));
pow(payMent,-loanDuration);
But
(1 - (1 + monthlyIntrest))
doesn’t quite look right. It resolves down to monthlyIntrest
, so it’s very likely there is at least one additional transcription error typing in the formula.
9
solved Too few arguments in call [closed]