c3-2.c 292 B

12345678910
  1. #include <stdio.h>
  2. int main( )
  3. {
  4. float p0=1000,r1=0.0036,r2=0.0225,r3=0.0198,p1,p2,p3;
  5. p1 = p0 * (1 + r1);
  6. p2 = p0 * (1 + r2);
  7. p3 = p0 * (1 + r3/2) * (1 + r3/2);
  8. printf("p1=%f\np2=%f\np3=%f\n",p1,p2,p3);
  9. return 0;
  10. }