prog.c: In function ‘main’:
prog.c:15:16: warning: format ‘%f’ expects a matching ‘double’ argument [-Wformat=]
printf("y= %f\n");
^
prog.c:18:4: error: expected ‘}’ before ‘else’
else if (x%2 != 0)
^~~~
prog.c:21:16: warning: format ‘%f’ expects a matching ‘double’ argument [-Wformat=]
printf("y= %f\n");
^
prog.c:5:7: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
float y;
^
prog.c: At top level:
prog.c:27:1: error: expected identifier or ‘(’ before ‘return’
return 0;
^~~~~~
prog.c:28:1: error: expected identifier or ‘(’ before ‘}’ token
}
^