fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. while (true)
  5. {
  6. float x;
  7. scanf("%f", &x);
  8. float xs = 1;
  9. float ps = 1;
  10. float d = xs / ps;
  11. float r = d;
  12. int i = 1;
  13. while (d > 0.0001)
  14. {
  15. xs *= x;
  16. ps *= i++;
  17. d = xs / ps;
  18. r += d;
  19. }
  20. printf("%.2f\n", r);
  21. }
  22. return 0;
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:4:9: error: ‘true’ undeclared (first use in this function)
  while (true)
         ^~~~
prog.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty