fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main() {
  4. float p,r,t;
  5. scanf("%f%f%f",&p,&r,&t);
  6. printf("SI=%.2f\nCI=%.2f", (p*r*t)/100, p*pow(1+r/100,t)-p);
  7. return 0;
  8. }
  9.  
Success #stdin #stdout 0.01s 5320KB
stdin
5 7 6
stdout
SI=2.10
CI=2.50