fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. float x = 1;
  6. float coefficients[] = {1, -4, 3, -2, 1, -9};
  7. float result = 0;
  8.  
  9. for (int i = 0; i < sizeof(coefficients)/sizeof(float); i++) {
  10. result = coefficients[i] + result*x;
  11. }
  12.  
  13. printf("%f\n", result);
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
-10.000000