fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. float p,r,d,SI;
  5. printf("enter the principal amount-");
  6. scanf("%f\n",p);
  7. printf("enter the rate of interest-");
  8. scanf("%f\n",r);
  9. printf("enter duration in years-");
  10. scanf("%f\n",d);
  11. SI=(p*r*d)/100;
  12. printf("simple interest is %f %",&SI);
  13. return 0;
  14. }
  15.  
  16.  
  17.  
Runtime error #stdin #stdout 0s 9432KB
stdin
1000.0 
8.2
2.3
stdout
Standard output is empty