fork download
  1. #include <stdio.h>
  2. #include<math.h>
  3. #include<locale.h>
  4.  
  5. int main(void)
  6. {
  7. setlocale (LC_ALL,"russian");
  8. float x,y,a,b,c;
  9. printf ("введите границы A и B\n");
  10. scanf ("%f %f", &A,&B);
  11. printf ("введите шаг H\n");
  12. scanf ("%f", &h);
  13. x=a;
  14. while (x<=b)
  15. {
  16. if (x<-1) y=pow((x+1),4);
  17. else if (x<1) y=1-cos(3.14*x);
  18. else y=-pow((x-1),2);
  19. printf ("x=%.2f y=%.2f\n",x,y);
  20. x=x+h;
  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:10:19: error: ‘A’ undeclared (first use in this function)
  scanf ("%f %f", &A,&B);
                   ^
prog.c:10:19: note: each undeclared identifier is reported only once for each function it appears in
prog.c:10:22: error: ‘B’ undeclared (first use in this function)
  scanf ("%f %f", &A,&B);
                      ^
prog.c:12:16: error: ‘h’ undeclared (first use in this function)
  scanf ("%f", &h);
                ^
prog.c:8:16: warning: unused variable ‘c’ [-Wunused-variable]
  float x,y,a,b,c;
                ^
stdout
Standard output is empty