/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double *' [-Wformat=]
6 | scanf("%f,%f,%f",&a,&b,&c);
| ~^ ~~
| | |
| float * double *
| %lf
/in/foo.c:6:20: warning: format '%f' expects argument of type 'float *', but argument 3 has type 'double *' [-Wformat=]
6 | scanf("%f,%f,%f",&a,&b,&c);
| ~^ ~~
| | |
| float * double *
| %lf
/in/foo.c:6:23: warning: format '%f' expects argument of type 'float *', but argument 4 has type 'double *' [-Wformat=]
6 | scanf("%f,%f,%f",&a,&b,&c);
| ~^ ~~
| | |
| float * double *
| %lf
/in/foo.c:7:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
7 | if(a=0){
| ^
/in/foo.c:8:20: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
8 | if(b=0){
| ^
/in/foo.c:13:9: error: expected '}' before 'else'
13 | else{
| ^~~~
/in/foo.c:14:9: error: 'delta' undeclared (first use in this function)
14 | delta=(b*b-4*a*c);
| ^~~~~
/in/foo.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:16:9: error: 'x1' undeclared (first use in this function); did you mean 'x'?
16 | x1=-b+sqrt(delta)/2a;
| ^~
| x
/in/foo.c:16:15: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
16 | x1=-b+sqrt(delta)/2a;
| ^~~~
/in/foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
/in/foo.c:16:15: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
16 | x1=-b+sqrt(delta)/2a;
| ^~~~
/in/foo.c:16:15: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:16:27: error: invalid suffix "a" on integer constant
16 | x1=-b+sqrt(delta)/2a;
| ^~
/in/foo.c:17:9: error: 'x2' undeclared (first use in this function); did you mean 'x'?
17 | x2=-b+sqrt(delta)/2a;
| ^~
| x
/in/foo.c:17:27: error: invalid suffix "a" on integer constant
17 | x2=-b+sqrt(delta)/2a;
| ^~
/in/foo.c:19:9: error: expected '}' before 'else'
19 | else{
| ^~~~
/in/foo.c:20:17: error: 'real' undeclared (first use in this function)
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^~~~
/in/foo.c:20:25: error: invalid suffix "a" on integer constant
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^~
/in/foo.c:20:28: error: 'imagin' undeclared (first use in this function); did you mean 'main'?
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^~~~~~
| main
/in/foo.c:20:35: error: 'i' undeclared (first use in this function)
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^
/in/foo.c:20:37: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^~~~
/in/foo.c:20:37: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:20:50: error: invalid suffix "a" on integer constant
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^~
/in/foo.c:20:27: warning: left-hand operand of comma expression has no effect [-Wunused-value]
20 | real=-b/2a,imagin=i*sqrt(-delta)/2a;
| ^
/in/foo.c:21:25: error: 'image' undeclared (first use in this function)
21 | x1=real+image,x2=real-image;
| ^~~~~
/in/foo.c:21:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
21 | x1=real+image,x2=real-image;
| ^
/in/foo.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
/in/foo.c:5:16: warning: variable 'x' set but not used [-Wunused-but-set-variable]
5 | double x,a,b,c;
| ^