fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. #include <stdio.h>
  6. #include <math.h>
  7.  
  8. int main(void) {
  9. double E = 5, R = 1000, C = 0.1e-6, t, I;
  10.  
  11. printf("t\tI\n");
  12. for (t = 0.0000; t < 0.001; t = t + 0.0001) {
  13. I = E / R * exp(-t / (C * R));
  14. printf("%f\t%f\n", t, I);
  15. }
  16.  
  17. return 0;
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
Standard output is empty