79203401

Date: 2024-11-19 12:24:35
Score: 1
Natty:
Report link

//you are right, just need to handle floating points for corner cases

double termOfGP(int A,int B,int N) { double nthTerm = (A * (double) ( (double) pow(B, N-1) / (double) pow(A, N-1) ) );

 return nthTerm;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nitin