fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. float x,y,a=-1, b=4, n=1000, h;
  6. float max, min, S;
  7. printf("Введіть x \n");
  8. scanf("x=%f ", &x );
  9. printf("Введіть y \n");
  10. scanf("y=%f ", &y);
  11. h=(b-a)/n;
  12. x=a;
  13. S=min=max=pow(x,3)-12*x+7;
  14. while(x<b){
  15. x=x+h;
  16. y=pow(a,3)-12*a+7;
  17. if(max<y) max=y;
  18. if(min>y) min=y;
  19. S=S+y;
  20. }
  21. printf("min=%f , max=%f \n "x, y);
  22. return 0;
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 10320KB
stdin
0.0 3.0
compilation info
prog.c: In function ‘main’:
prog.c:21:29: error: expected ‘)’ before ‘x’
 printf("min=%f , max=%f \n "x, y);
                             ^
prog.c:21:14: warning: format ‘%f’ expects a matching ‘double’ argument [-Wformat=]
 printf("min=%f , max=%f \n "x, y);
              ^
prog.c:21:23: warning: format ‘%f’ expects a matching ‘double’ argument [-Wformat=]
 printf("min=%f , max=%f \n "x, y);
                       ^
stdout
Standard output is empty