fork download
  1. #include <stdio.h>
  2.  
  3. int main () {
  4.  
  5. float x;
  6. float result ;
  7.  
  8. const int a = 1 ;
  9. const int b = 2 ;
  10. const int c = 3 ;
  11.  
  12. printf ("value x:") ;
  13. scanf ("%f", &x) ;
  14.  
  15. result = a*x*x + b*x + c ;
  16.  
  17. printf ("value polynomial %.0fx^2 + %.0fx + %.0f when x = %.2f is: %.2f", (float) a, (float) b, (float) c, x , result) ;
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
value x:value polynomial 1x^2 + 2x + 3 when x = 0.00 is: 3.00