fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5. double x;
  6. double y;
  7. double z1;
  8. double z2;
  9.  
  10. scanf("%lf",&x);
  11. scanf("%lf",&y);
  12. z1=pow( cos(x),4)+pow(sin(y),2)+1.0/4*pow(sin(2x),2)-1
  13. z2=sin(x+y)*sin(y-x)
  14. printf("z1=%lf",z1);
  15. printf("z2=%lf",z2);
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 4364KB
stdin
0
0
compilation info
prog.c: In function ‘main’:
prog.c:12:48: error: invalid suffix "x" on integer constant
  z1=pow( cos(x),4)+pow(sin(y),2)+1.0/4*pow(sin(2x),2)-1
                                                ^~
prog.c:12:56: error: expected ‘;’ before ‘z2’
  z1=pow( cos(x),4)+pow(sin(y),2)+1.0/4*pow(sin(2x),2)-1
                                                        ^
                                                        ;
  z2=sin(x+y)*sin(y-x)
  ~~                                                     
prog.c:7:9: warning: variable ‘z1’ set but not used [-Wunused-but-set-variable]
  double z1;
         ^~
prog.c:10:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lf",&x);
  ^~~~~~~~~~~~~~~
prog.c:11:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lf",&y);
  ^~~~~~~~~~~~~~~
stdout
Standard output is empty