fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(void) {
  4. float principal,time,rate;
  5. printf("welcome to the interest calculater\n");
  6. printf("\n please enter principal: ");
  7. scanf("%f",&principal);
  8. printf("\n Now enter time: ");
  9. scanf("%f",&time);
  10. printf("\n Now enter rate: ");
  11. scanf("%f",&rate);
  12.  
  13. float interest=principal*pow((1+rate/100),time);
  14. printf("\n the interest rate is %f",interest);
  15.  
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5264KB
stdin
Standard input is empty
stdout
welcome to the interest calculater

 please enter principal: 
 Now enter time: 
 Now enter rate: 
 the interest rate is 0.000000