submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s375265839
p00004
C
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<math.h> float si(float a) { a *= 1000; if (a > 0) { a += 0.5; } else { a -= 0.5; } a = int(a); a /= 1000; return a; } int main() { float a, b, c, d, e, f; while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) { b *= d; c *= d; e *= a; f *= a; float x, y; y = (c - f) / (b - e); x = (c / d - b / d * y) / a; printf("%.3f %.3f\n", si(x), si(y)); } }
main.c: In function 'si': main.c:13:13: error: expected expression before 'int' 13 | a = int(a); | ^~~
s614038052
p00004
C
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<math.h> float si(float a) { a *= 1000; if (a > 0) { a += 0.5; } else { a -= 0.5; } a = int(a); a /= 1000; return a; } int main() { float a, b, c, d, e, f; while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) { b *= d; c *= d; e *= a; f *= a; float x, y; if (a != 0) { y = (c - f) / (b - e); x = (c / d - b / d * y) / a; } else { y = c / b; x = (f - e * y) / d; } printf("%.3f %.3f\n", si(x), si(y)); } }
main.c: In function 'si': main.c:13:13: error: expected expression before 'int' 13 | a = int(a); | ^~~
s005247564
p00004
C
#include<stdio.h> float s(float a) { a *= 1000; if (a > 0) { a += 0.5; } else { a -= 0.5; } a = int(a); a /= 1000; return a; } int main() { float a, b, c, d, e, f; while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) { b *= d; c *= d; e *= a; f *= a; float x, y; if (a != 0) { y = (c - f) / (b - e); x = (c / d - b / d * y) / a; } else { y = c / b; x = (f - e * y) / d; } printf("%.3f %.3f\n", s(x), s(y)); } }
main.c: In function 's': main.c:11:13: error: expected expression before 'int' 11 | a = int(a); | ^~~
s409544286
p00004
C
#include<stdio.h> #include<math.h> rround(double x); double det(double a,double b,double c,double d); int main(){ double a,b,c,d,e,f; while(scanf("\n%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ printf("%.3lf %.3lf\n",rround(1000*det(c,f,b,e)/det(a,d,b,e))/1000.0,rround(1000*det(a,d,c,f)/det(a,d,b,e))/1000.0); } return 0; } double det(double a,double b,double c,double d){ double determinant; determinant=a*d-b*c; return determinant; } double rround(double x){ if(x==-0.0){ x=-x } return x; }
main.c:3:1: warning: data definition has no type or storage class 3 | rround(double x); | ^~~~~~ main.c:3:1: error: type defaults to 'int' in declaration of 'rround' [-Wimplicit-int] main.c:18:8: error: conflicting types for 'rround'; have 'double(double)' 18 | double rround(double x){ | ^~~~~~ main.c:3:1: note: previous declaration of 'rround' with type 'int(double)' 3 | rround(double x); | ^~~~~~ main.c: In function 'rround': main.c:20:5: error: expected ';' before '}' token 20 | x=-x | ^ | ; 21 | } | ~
s895807654
p00004
C
#include<stdio.h> #include<math.h> double rround(double x); double det(double a,double b,double c,double d); int main(){ double a,b,c,d,e,f; while(scanf("\n%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ printf("%.3lf %.3lf\n",rround(1000*det(c,f,b,e)/det(a,d,b,e))/1000.0,rround(1000*det(a,d,c,f)/det(a,d,b,e))/1000.0); } return 0; } double det(double a,double b,double c,double d){ double determinant; determinant=a*d-b*c; return determinant; } double rround(double x){ if(x==-0.0){ x=-x } return x; }
main.c: In function 'rround': main.c:20:5: error: expected ';' before '}' token 20 | x=-x | ^ | ; 21 | } | ~
s343287229
p00004
C
#include <stdio.h> int main() { int i=0,k; double a[10],b[10],c[10],d[10],e[10],f[10],x[10],y[10]; while(scanf("%d %d %d %d %d %d",&a[i],&b[i],&c[i],&d[i],&e[i],&f[i])!=EOF) { i++; k++; } for(i=0;i<k;i++) { y[i] = (c[i]*d[i]-f[i]*a[i])-(b[i]*d[i]-e[i]*a[i]); x[i] = (c[i]*e[i]-f[i]*b[i])-(a[i]*e[i]-d[i]*b[i]); printf("%d %d",x[i],y[i]) } return 0; }
main.c: In function 'main': main.c:17:42: error: expected ';' before '}' token 17 | printf("%d %d",x[i],y[i]) | ^ | ; 18 | } | ~
s525761713
p00004
C
#include<stdio.h> void calc_inverse_matrix(double mat[2][2], double inv_mat[2][2]) { double det = mat[0][0]*mat[1][1] - mat[0][1]*mat[1][0]; inv_mat[0][0] = mat[1][1]/det; inv_mat[0][1] = -mat[0][1]/det; inv_mat[1][0] = -mat[1][0]/det; inv_mat[1][1] = mat[0][0]/det; } int read_inputline(double mat[2][2], double vec[2]) { return scanf("%d %d %d %d %d %d", &mat[0][0], &mat[0][1], &vec[0], &mat[1][0], &mat[1][1], &vec[1]); } void calc_ans(double mat[2][2], double vec[2], ans[2]) { static inv_mat[2][2]; calc_inverse_matrix(mat, inv_mat); ans[0] = inv_mat[0][0]*vec[0] + inv_mat[0][1]*vec[1]; ans[1] = inv_mat[1][0]*vec[0] + inv_mat[1][1]*vec[1]; } int main(){ double mat[2][2], vec[2], inv_mat[2][2], ans[2]; while(read_inputline(mat, vec)!=EOF){ calc_ans(mat, inv_mat, ans); printf("%.3f\n", ans[0], ans[1]); } return 0; }
main.c:20:48: error: unknown type name 'ans' 20 | void calc_ans(double mat[2][2], double vec[2], ans[2]) | ^~~ main.c: In function 'main': main.c:34:9: error: implicit declaration of function 'calc_ans' [-Wimplicit-function-declaration] 34 | calc_ans(mat, inv_mat, ans); | ^~~~~~~~
s755687921
p00004
C
#include<stdio.h> main() double a,b,c,d,e,f,x,y; while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){ x=(b*f-c*e)/(a*e-b*d); y=(a*f-c*d)/(b*d-a*e); printf("%4.3f %4.3f",x,y); } return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:4:5: error: expected declaration specifiers before 'while' 4 | while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){ | ^~~~~ main.c:9:5: error: expected declaration specifiers before 'return' 9 | return 0; | ^~~~~~ main.c:10:1: error: expected declaration specifiers before '}' token 10 | } | ^ main.c:3:26: error: declaration for parameter 'y' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:24: error: declaration for parameter 'x' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:22: error: declaration for parameter 'f' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:20: error: declaration for parameter 'e' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:18: error: declaration for parameter 'd' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:16: error: declaration for parameter 'c' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:14: error: declaration for parameter 'b' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:3:12: error: declaration for parameter 'a' but no such parameter 3 | double a,b,c,d,e,f,x,y; | ^ main.c:11: error: expected '{' at end of input
s221400633
p00004
C
#include <stdio.h> int main(void){ double a,b,c,d,e,f,x,y; while(EOF==scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) ){ y = (c-f*(a/d)) / (b-e*(a/d)) x = (c - b*y)/a printf("%lf %lf\n", x, y); } return 0; }
main.c: In function 'main': main.c:7:34: error: expected ';' before 'x' 7 | y = (c-f*(a/d)) / (b-e*(a/d)) | ^ | ; 8 | x = (c - b*y)/a | ~
s365732571
p00004
C
#include <cstdio> int main(){ int a, b, c, d, e, f; double x, y; while(scanf("%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f) != EOF){ y = (double)(a * f - c * d) / (double)(a * e - b * d); x = ((double)c - (double)b * y) / (double)a; printf("%.3f %.3f\n", x, y); } return 0; }
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s969011551
p00004
C
#include <stdio.h> int gcd(int a, int b); int main(void) { int a, b, c, d, e, f; double x, y; int g, l; while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF){ g = gcd(a, d); if (g < 0)g *= -1; l = a / g * d; b *= d * g; e *= a * g; c *= d * g; f *= a * g; printf("becflgad = %d,%d,%d,%d,%d,%d,%d,%d\n", b, e, c, f, l, g, a, d); if ( { y = (c + f) / (b + e) * 1.0; x = (c - y * b) / l * 1.0; } if ((a > 0 && d > 0) || (a < 0 && b < 0)){ y = (c - f) / (b - e) * 1.0; x = (c - y * b) / l * 1.0; } printf("%.3lf %.3lf\n", x, y); } return (0); } int gcd(int a, int b) { if (a % b == 0)return (b); return (gcd(b, a % b)); }
main.c: In function 'main': main.c:20:22: error: expected expression before '{' token 20 | if ( { | ^ main.c:31:9: error: expected expression before '}' token 31 | } | ^
s320351434
p00004
C
#include<stdio.h> #include<stdlib.h> #include<math.h> double round_d(double x) { if ( x => 0.0 ) { return floor(x + 0.5); } else { return -1.0 * floor(fabs(x) + 0.5); } } int main(){ double a,b,c,d,e,f,kai1[4096],kai2[4096]; int i=0,n; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ kai1[i]=(c*e/b-f)/(a*e/b-d); kai2[i]=(f*a/d-c)/(e*a/d-b); if((c*e/b-f)==0||(a*e/b-d)==0)kai1[i]=0; if((f*a/d-c)==0||(e*a/d-b)==0)kai2[i]=0; i++; } for(n=0;n<i;n++)printf("%.3lf %.3lf\n",round_d(kai1[n]),round_d(kai2[n])); return 0; }
main.c: In function 'round_d': main.c:7:13: error: expected expression before '>' token 7 | if ( x => 0.0 ) { | ^
s613508110
p00004
C
#include<stdio.h> #include<stdlib.h> #include<math.h> int main(){ double a,b,c,d,e,f,kai1,kai2; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ kai1=(c*e/b-f)/(a*e/b-d); kai2=(c-a*kai1[i])/b; printf("%.3lf %.3lf\n",kai1+0,00001,kai2+0,00001); } return 0; }
main.c: In function 'main': main.c:16:32: error: 'i' undeclared (first use in this function) 16 | kai2=(c-a*kai1[i])/b; | ^ main.c:16:32: note: each undeclared identifier is reported only once for each function it appears in
s968751510
p00004
C
#include<stdio.h> #include<math.h> int main(void){ double a,b,c,d,e,f,det; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){ det=a*e-b*d; x=(e*c-b*f)/det; y=(-d*c+a*f)/det; printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:10:5: error: 'x' undeclared (first use in this function) 10 | x=(e*c-b*f)/det; | ^ main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in main.c:11:5: error: 'y' undeclared (first use in this function) 11 | y=(-d*c+a*f)/det; | ^
s549245834
p00004
C
include <stdio.h> int main() { double a, b, c, d, e, f; double x, y; while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) { x = (c*e-b*f)/(a*e-b*d); y = (a*f-c*d)/(a*e-b*d); printf("%.3lf %.3lf\n", x, y); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s779627439
p00004
C
int main(){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) !=EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.5; y=j+0.5; printf("%.41f %.41f\n",x,y); return 0; }
main.c: In function 'main': main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) !=EOF) { | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) !=EOF) { | ^~~~~ main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:55: error: 'EOF' undeclared (first use in this function) 3 | while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) !=EOF) { | ^~~ main.c:3:55: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:55: note: each undeclared identifier is reported only once for each function it appears in main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("%.41f %.41f\n",x,y); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s098883635
p00004
C
int main(){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.5; y=j+0.5; printf("%.31f %.31f\n",x,y); return 0; }
main.c: In function 'main': main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:56: error: 'EOF' undeclared (first use in this function) 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~ main.c:3:56: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:56: note: each undeclared identifier is reported only once for each function it appears in main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("%.31f %.31f\n",x,y); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s403728828
p00004
C
int main(){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.5; y=j+0.5; printf("%.31f %.31f\n",x,y); return 0; }
main.c: In function 'main': main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:56: error: 'EOF' undeclared (first use in this function) 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~ main.c:3:56: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:56: note: each undeclared identifier is reported only once for each function it appears in main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("%.31f %.31f\n",x,y); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s330789053
p00004
C
int main(){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.0005; y=j+0.0005; printf("%.3f %.3f\n",x,y); return 0; }
main.c: In function 'main': main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:56: error: 'EOF' undeclared (first use in this function) 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~ main.c:3:56: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:56: note: each undeclared identifier is reported only once for each function it appears in main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("%.3f %.3f\n",x,y); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s508358103
p00004
C
int main(void){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.0005; y=j+0.0005; printf("%.3f %.3f\n",x,y); return 0; }
main.c: In function 'main': main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:62: error: 'EOF' undeclared (first use in this function) 3 | while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~ main.c:3:62: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:62: note: each undeclared identifier is reported only once for each function it appears in main.c:8:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("%.3f %.3f\n",x,y); | ^~~~~~ main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s619094041
p00004
C
#include <stdio.h> int main(){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.0005; y=j+0.0005; printf("%.3f %.3f\n",x,y); return 0; }
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | } | ^
s748196983
p00004
C
#include <stdio.h> int main(){ double a,b,c,d,e,f,x,y; while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) { x=(c*e-f*b)/(a*e-d*b); y=(c*d-f*a)/(b*d-e*a); printf("%.31f %.31f\n",x,y); return 0; }
main.c: In function 'main': main.c:10:1: error: expected declaration or statement at end of input 10 | } | ^
s025072133
p00004
C
#include<stdio.h> //#define EPS 0.0000001 int main(void){ double x,y,r,s,t,u,a,b,p,c,d,q; while(1){ if(scanf("%lf",&a)==EOF)break; scanf("%lf%lf%lf%lf%lf",&b,&p,&c,&d,&q); r=p*d-b*q; s=a*d-b*c; x=r/s; t=a*q-p*c; u=a*d-b*c; y=t/u; if(-EPS<x && x<=0) x = 0; if(-EPS<y && y<=0) y = 0; printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:14:13: error: 'EPS' undeclared (first use in this function) 14 | if(-EPS<x && x<=0) x = 0; | ^~~ main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
s557283062
p00004
C
#include<stdio.h> int main(void){ int a,b,c,d,e,f,i double x,y; for(i=0;i<2;i++) scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f); x=(c*e-f*e)/(a*e-b*d); y=(c*d-a*f)/(b*d-a*e); printf("%.3f %.3f ",x,y); return(0); }
main.c: In function 'main': main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double' 4 | double x,y; | ^~~~~~ main.c:6:7: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<2;i++) | ^ main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in main.c:8:3: error: 'x' undeclared (first use in this function) 8 | x=(c*e-f*e)/(a*e-b*d); | ^ main.c:9:3: error: 'y' undeclared (first use in this function) 9 | y=(c*d-a*f)/(b*d-a*e); | ^
s046863749
p00004
C
#include<stdio.h> int main(void){ int a,b,c,d,e,f,i double x,y; for(i=0;i<2;i++){ scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f); x=(c*e-f*e)/(a*e-b*d); y=(c*d-a*f)/(b*d-a*e); printf("%.3f %.3f ",x,y); } return(0); }
main.c: In function 'main': main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double' 4 | double x,y; | ^~~~~~ main.c:6:7: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<2;i++){ | ^ main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in main.c:8:3: error: 'x' undeclared (first use in this function) 8 | x=(c*e-f*e)/(a*e-b*d); | ^ main.c:9:3: error: 'y' undeclared (first use in this function) 9 | y=(c*d-a*f)/(b*d-a*e); | ^
s031277660
p00004
C
int main(void){ int a,b,c,d,e,f; int i,countx=0,county=0; double x,y; double tempx,tempy; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ x = (double)(c*e-f*b)/(a*e-b*d); y = (double)-(c*d-f*a)/(a*e-b*d); tempx = x; tempy = y; for(i = 0;i < 4;i++){ tempx *= 10; tempy *= 10; } if(-0.0005<x && x<=0){ x=0; } if(-0.0005<y && y<=0){ y=0; } while(1){ tempx -= 1; countx++; if(countx == 10){ countx = 0; } if((int)tempx % 10 == 0){ break; } } while(1){ tempy -= 1; county++; if(county == 10){ county = 0; } if((int)tempy % 10 == 0){ break; } } if(countx > 4){ x += 0.001; } if(county > 4){ y += 0.001; } printf("%.3f %.3f\n",(double)x,(double)y); } return 0; }
main.c: In function 'main': main.c:8:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main.c:8:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 8 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ | ^~~~~ main.c:8:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:63: error: 'EOF' undeclared (first use in this function) 8 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ | ^~~ main.c:8:63: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:8:63: note: each undeclared identifier is reported only once for each function it appears in main.c:53:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 53 | printf("%.3f %.3f\n",(double)x,(double)y); | ^~~~~~ main.c:53:17: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:53:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:53:17: note: include '<stdio.h>' or provide a declaration of 'printf'
s923329414
p00004
C
#include <cstdlib> #include <iostream> #include <algorithm> #include <stdio.h> using namespace std; int main() { double x1,x2,y1,c1,y2,c2,y,x; while((scanf("%lf %lf %lf %lf %lf %lf",&x1,&x2,&y1,&y2,&c1,&c2))!=EOF) { x=((c1*y1-x2*c2)/(x1*c1-x2*y2)); y=((-(y2*y1)+x1*c2)/(x1*c1-x2*y2)); if(x==0) { x=0; } if(y==0) { y=0; } printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c:1:10: fatal error: cstdlib: No such file or directory 1 | #include <cstdlib> | ^~~~~~~~~ compilation terminated.
s702290455
p00004
C
include<stdio.h> int main() { double a[6],num; int i; double ans[2]; for(;;){ for(i=0;i<6;i++){ scanf("%lf",&a[i]); } num=a[0]*a[4]-a[1]*a[3]; ans[0]=(a[4]*a[2]-a[1]*a[5])/num; ans[1]=(a[0]*a[5]-a[3]*a[2])/num; printf("%.3lf %.3lf\n",ans[0],ans[1]); } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s850654775
p00004
C
/***************************************** AOJ 0004 *****************************************/ /*------------- ax + by = c dx + ey = f -------------*/ #include<stdio.h> #define NUM 10 int main(void) { int i = 0; double a, b, c; double d, e, f; double x[NUM] = { 0 }; double y[NUM] = { 0 }; while ((scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) != -1) { /* y????±??????? */ b = b / a; c = c / a; a = 1; e = e / d; f = f / d; d = 1; b = b - e; c = c - f; y[i] = c / b; /* x????±??????? */ a = a / b; c = c / b; b = 1; d = d / e; f = f / e; e = 1; a = a - d; c = c - f; x[i] = c / a; i++; } for (j = 0; j < i; j++) { printf("%.3f %.3f\n", x[j], y[j]) } return 0; }
main.c: In function 'main': main.c:60:14: error: 'j' undeclared (first use in this function) 60 | for (j = 0; j < i; j++) { | ^ main.c:60:14: note: each undeclared identifier is reported only once for each function it appears in main.c:61:50: error: expected ';' before '}' token 61 | printf("%.3f %.3f\n", x[j], y[j]) | ^ | ; 62 | } | ~
s224495714
p00004
C
include <stdio.h> int main(void){ float a, b, c, d, e, f; float x, y; while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)==6){ x=(c*e-b*f)/(a*e-b*d); y=(c-a*x)/b; printf("%.3f %.3f\n", x, y); return (0); } }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s498045300
p00004
C
include <stdio.h> int main(void){ float a, b, c, d, e, f; float x, y; while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)==6){ x=(c*e-b*f)/(a*e-b*d); y=(c-a*x)/b; printf("%.3f %.3f\n", x, y); return (0); } }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s038123894
p00004
C
#include <stdlib.h> #include <stdio.h> int main(int argc, char* argv[]) { int a = atoi(argv[1]); int b = atoi(argv[2]); int c = atoi(argv[3]); int d = atoi(argv[4]); int e = atoi(argv[5]); int f = atoi(argv[6]); int tr = a*e-b*d; double x = (int)(1000*(e*c - b*f)/tr)/1000.0; double y = (int)(1000*(a*f - d*c)/tr)/1000.0; printf("%.3f %.3f\n",x,y); return 0; } ~
main.c:21:1: error: expected identifier or '(' before '~' token 21 | ~ | ^
s349406358
p00004
C
//#include<iostream> #include<cstdio> //using namespace std; int main(){ double a,b,c,d,e,f,x,y; scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f); y=(c*d-f*a)/(b*d-e*a); x=(c-b*y)/a; if(x==-0)x=0; if(y==-0)y=0; printf("%.3f %.3f\n",x,y); return 0; }
main.c:2:9: fatal error: cstdio: No such file or directory 2 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s142099468
p00004
C
//#include<iostream> #include<cstdio> //using namespace std; int main(){ double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ y=(c*d-f*a)/(b*d-e*a); x=(c-b*y)/a; if(x==-0)x=0; if(y==-0)y=0; printf("%.3f %.3f\n",x,y); } return 0; }
main.c:2:9: fatal error: cstdio: No such file or directory 2 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s718023734
p00004
C
#include<stdio.h> int main(){ double a,b,c,d,e,f,x,y; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)=-1); y=(f-c*d/a)/(e-b*d/a); x=c/a-b*y/a; printf("%.3f %.3f\n",x+0.00005,y+0.00005); return 0; }
main.c: In function 'main': main.c:5:56: error: lvalue required as left operand of assignment 5 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)=-1); | ^
s930155218
p00004
C
#include<stdio.h> int main() { int a,b,c,d,e,f; double m,n; while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF) { m=(a*f-c*d)/(a*e-b*d); n=(c-b*y)/a; printf("%.3lf %.3lf\n",m,n); } return 0; }
main.c: In function 'main': main.c:10:8: error: 'y' undeclared (first use in this function) 10 | n=(c-b*y)/a; | ^ main.c:10:8: note: each undeclared identifier is reported only once for each function it appears in
s292605576
p00004
C
#include<stdio.h> int main(void) { double a, b, c, d, e, f,x,y; while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) { x = e*c - b*f / a*e - b*d; y = c*d - a*f / b*d - a*c; printf("%.3lf %.3lf ", x, y); } return 0; }
main.c: In function 'main': main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) { | ^~~~~~~ | scanf
s745696994
p00004
C
#include<stdio.h> int main(void) { double a, b, c, d, e, f,x,y; while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) { x = (e*c - b*f) / (a*e - b*d); y = (f - d*x) / e; printf("%.3lf %.3lf ", x, y); } return 0; }
main.c: In function 'main': main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) { | ^~~~~~~ | scanf
s857491611
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ #define NUM 1000 typedef struct{ double formula_1[3]; double formula_2[3]; } formula_t; double seek_x(formula_t fml); double seek_y(formula_t fml, double x); int main(void) { formula_t fml; double x[NUM], y[NUM]; int cnt = 0; int i; while(scanf("%lf %lf %lf %lf %lf %lf", &fml.formula_1[0], &fml.formula_1[1], &fml.formula_1[2], &fml.formula_2[0], &fml.formula_2[1], &fml.formula_2[2]) != EOF){ x[cnt] = seek_x(fml); y[cnt] = seek_y(fml, x); cnt++; } for(i = 0; i < cnt; i++){ printf("%.3f %.3f\n", x[i] + 0.0005, y[i] + 0.0005); } return 0; } double seek_x(formula_t fml) { int i; double x; double multiple; multiple = fml.formula_1[1] / fml.formula_2[1]; for(i = 0; i < NUM; i++){ fml.formula_2[i] *= multiple; fml.formula_1[i] -= fml.formula_2[i]; } x = fml.formula_1[2] / fml.formula_1[0]; return x; } double seek_y(formula_t fml, double x) { double y; fml.formula_1[0] *= x; fml.formula_1[2] -= fml.formula_1[0]; y = fml.formula_1[2] / fml.formula_1[1]; return y; }
main.c: In function 'main': main.c:25:26: error: incompatible type for argument 2 of 'seek_y' 25 | y[cnt] = seek_y(fml, x); | ^ | | | double * main.c:15:37: note: expected 'double' but argument is of type 'double *' 15 | double seek_y(formula_t fml, double x); | ~~~~~~~^
s826891700
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ typedef struct{ double formula_1[3]; double formula_2[3]; } formula_t; double seek_x(formula_t fml); double seek_y(formula_t fml, double x); int main(void) { formula_t fml; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &fml.formula_1[0], &fml.formula_1[1], &fml.formula_1[2], &fml.formula_2[0], &fml.formula_2[1], &fml.formula_2[2]) != EOF){ x = seek_x(fml); y = seek_y(fml, x); printf("%.3f %.3f\n", x, y); } return 0; } double seek_x(formula_t fml) { int i; double x; double multiple; multiple = fml.formula_1[1] / fml.formula_2[1]; for(i = 0; i < NUM; i++){ fml.formula_2[i] *= multiple; fml.formula_1[i] -= fml.formula_2[i]; } x = fml.formula_1[2] / fml.formula_1[0]; return x; } double seek_y(formula_t fml, double x) { double y; fml.formula_1[0] *= x; fml.formula_1[2] -= fml.formula_1[0]; y = fml.formula_1[2] / fml.formula_1[1]; return y; }
main.c: In function 'seek_x': main.c:33:18: error: 'NUM' undeclared (first use in this function) 33 | for(i = 0; i < NUM; i++){ | ^~~ main.c:33:18: note: each undeclared identifier is reported only once for each function it appears in
s004242568
p00004
C
#include<stdio.h> int main(void){ double a, b, c,d,e,f,x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){ y=(a*f-c)/(e-d*b); x=(f-e*y)/a; printf("%-3f %-3f", x, y); } return 0; }
main.c: In function 'main': main.c:6:51: error: stray '\' in program 6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){ | ^ main.c:6:52: error: lvalue required as left operand of assignment 6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){ | ^
s523093553
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ int main(void) { formula_t fml; double x, y; double a, b, c, d, e, f; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f); x = (b * f - c * e)/(b * d - a * e); y = (a * f - c * d)/(a * e - b * d); printf("%.3f %.3f\n", x, y); } return 0; }
main.c: In function 'main': main.c:9:3: error: unknown type name 'formula_t' 9 | formula_t fml; | ^~~~~~~~~ main.c:12:65: error: expected ')' before ';' token 12 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f); | ~ ^ | ) main.c:16:3: error: expected expression before '}' token 16 | } | ^ main.c: At top level: main.c:17:3: error: expected identifier or '(' before 'return' 17 | return 0; | ^~~~~~ main.c:18:1: error: expected identifier or '(' before '}' token 18 | } | ^
s239735860
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ int main(void) { double x, y; double a, b, c, d, e, f; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f); x = (b * f - c * e)/(b * d - a * e); y = (a * f - c * d)/(a * e - b * d); printf("%.3f %.3f\n", x, y); } return 0; }
main.c: In function 'main': main.c:11:65: error: expected ')' before ';' token 11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f); | ~ ^ | ) main.c:15:3: error: expected expression before '}' token 15 | } | ^ main.c: At top level: main.c:16:3: error: expected identifier or '(' before 'return' 16 | return 0; | ^~~~~~ main.c:17:1: error: expected identifier or '(' before '}' token 17 | } | ^
s401475194
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ int main(void) { double x, y; double a, b, c, d, e, f; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) x = (b * f - c * e)/(b * d - a * e); y = (a * f - c * d)/(a * e - b * d); printf("%.3f %.3f\n", x, y); } return 0; }
main.c:16:3: error: expected identifier or '(' before 'return' 16 | return 0; | ^~~~~~ main.c:17:1: error: expected identifier or '(' before '}' token 17 | } | ^
s205115872
p00004
C
#include <stdio.h> /* Aizu Online Judge Problem */ /* Volume0 0004:Simultaneous Equation */ /* ax + by = c dx + ey = f */ int main(void) { double x, y; double a, b, c, d, e, f; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)???!= EOF) { x = (b * f - c * e)/(b * d - a * e); y = (a * f - c * d)/(a * e - b * d); printf("%.3f %.3f\n", x, y); } return 0; }
main.c: In function 'main': main.c:11:66: warning: trigraph ??! ignored, use -trigraphs to enable [-Wtrigraphs] 11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)???!= EOF) main.c:11:66: error: expected expression before '?' token 11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)???!= EOF) | ^
s580826289
p00004
C
#include<stdio.h> int main(void) { int a,b,c,d,e,f; double x,y; while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) { x = (double)((e*c-b*f) / (a*e-b*d)); y = (double)((-(d*c)+a*f) / (a*e-b*d)); if (x == -0.000000) x = 0.000000; if (y == -0.000000) y = 0.000000; printf("%.3f %.3f\n",x,y); } return 0; } ~
main.c:15:1: error: expected identifier or '(' before '~' token 15 | ~ | ^
s070219375
p00004
C
#include <stdio.h> int main() { float a,b,c,d,e,f,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f))!=EOF x=((c)*(e)-(b)*(f))/((a)*(e)-(b)*(d)); y=((a)*(f)-(c)*(d))/((a)*(e)-(b)*(d)); printf("%.3f %.3f\n",x,y); return 0; }
main.c: In function 'main': main.c:5:57: error: expected expression before '!=' token 5 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f))!=EOF | ^~
s614519246
p00004
C
#include <stdio.h> #include <math.h> int main() { long long a,b,c,d,e,f; double x,y; while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e?,&f)!=EOF){ y = (((a*f)-(c*d)/?(a*e)-b)); x = ((a*e)/?((a*e)+(f-d))); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:60: error: expected expression before ',' token 8 | while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e?,&f)!=EOF){ | ^ main.c:10:19: error: expected expression before '?' token 10 | y = (((a*f)-(c*d)/?(a*e)-b)); | ^ main.c:10:27: error: expected ':' before ')' token 10 | y = (((a*f)-(c*d)/?(a*e)-b)); | ^ | : main.c:11:12: error: expected expression before '?' token 11 | x = ((a*e)/?((a*e)+(f-d))); | ^ main.c:11:26: error: expected ':' before ')' token 11 | x = ((a*e)/?((a*e)+(f-d))); | ^ | :
s228641925
p00004
C
#include<stdio.h> int main() { int a,b,c; char A='A',B='B',C='C',D='*'; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { if(a==b && a!=c) { printf("%c\n",C); } else if(a==c && c!=b) { printf("%c\n",B); } else if(b==c && b!=a) { printf("%c\n",A); } else if(a==b && b==c) { printf("%c\n",D) } } return 0; }
main.c: In function 'main': main.c:22:25: error: expected ';' before '}' token 22 | printf("%c\n",D) | ^ | ; 23 | } | ~
s492591029
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s524290708
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s861147697
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s492796555
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s418431966
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s993999297
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s373623695
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s019854001
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s755959682
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s941783803
p00004
C
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b))); x = (((c)-(b)*(y))/(a)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:8:62: error: expected expression before '!=' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^~ main.c:8:67: error: expected statement before ')' token 8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){ | ^
s564286437
p00004
C
#include <stdio.h> #include <math.h> int main() { double p,q,r,s,t,u; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&p,&q,&r,&s,&t,&u)!=EOF){ y = (((f)*(p)-(q)*(r))/((s)*(t)-(u)*(q))); x = (((r)-(q)*(y))/(p)); printf("%0.3lf %0.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:10:12: error: 'f' undeclared (first use in this function) 10 | y = (((f)*(p)-(q)*(r))/((s)*(t)-(u)*(q))); | ^ main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
s358070086
p00004
C
int main(void) { double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!= EOF){ printf("%.3lf %.3lf\n",(e*c-b*f)/(a*e-b*d),(c*d-a*f)/(b*d-a*e)); } return 0; }
main.c: In function 'main': main.c:6:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!= EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void) main.c:6:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!= EOF){ | ^~~~~ main.c:6:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:6:64: error: 'EOF' undeclared (first use in this function) 6 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!= EOF){ | ^~~ main.c:6:64: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:6:64: note: each undeclared identifier is reported only once for each function it appears in main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 7 | printf("%.3lf %.3lf\n",(e*c-b*f)/(a*e-b*d),(c*d-a*f)/(b*d-a*e)); | ^~~~~~ main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
s580801320
p00004
C
#include <stdio.h> int main(void) { ??? int a, b, c, d, e, f; ??? float x, y; ??? ??? while(scanf("%d %d %d %d %d %d", &a ,&b, &c, &d, &e, &f) != -1){ ??? x = (float)(c*e - b*f)/(a*e - b*d); ??? y = (float)(c*d - a*f)/(b*d - a*e); ??? if(-0.0005<x && x <=0) ??? x=0; ??? if(-0.005<y && y <=0) ??? y=0; ??? printf("%.3f %.3f\n",x,y); ??? } return 0; }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ??? int a, b, c, d, e, f; | ^ main.c:5:1: error: expected expression before '?' token 5 | ??? float x, y; | ^ main.c:6:1: error: expected expression before '?' token 6 | ??? | ^
s588756072
p00004
C
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { int a, b, c, d, e, f; double x, y; while (cin >> a >> b >> c >> d >> e >> f) { x = (-b * f + c * e) / (-b * d + a * e); y = (a * f - c * d) / (a * e - b * d); printf("%.3f %.3f\n", x, y); } return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s025748829
p00004
C
#include <cstdio> int main(){ int a,b,c,d,e,f; while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f)+1){ double x = (c*e-b*f)/(a*e-b*d); double y = (c*d-a*f)/(b*d-a*e); printf("%.3lf %.3lf\n", x, y); } return 0; }
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s760773564
p00004
C
#include<stdio.h> int main(){ float a,b,c,d,e,f,x,y; while(scanf_s("%f",&a)!=EOF){ scanf_s("%f %f %f %f %f",&b,&c,&d,&e,&f); y=(c*d-a*f)/(b*d-a*e); x=(c*e-b*f)/(a*e-b*d); printf("%f %f\n",x,y); } return 0; }
main.c: In function 'main': main.c:4:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 4 | while(scanf_s("%f",&a)!=EOF){ | ^~~~~~~ | scanf
s084335581
p00004
C
#include<stdio.h> int main(){ float a,b,c,d,e,f,x,y; //while(scanf_s("%f",&a)!=EOF){ while(scanf_s("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){ y=(c*d-a*f)/(b*d-a*e); x=(c*e-b*f)/(a*e-b*d); printf("%f %f\n",x,y); } return 0; }
main.c: In function 'main': main.c:5:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | while(scanf_s("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){ | ^~~~~~~ | scanf
s784376596
p00004
C
#include <stdio.h> #include <math.h> int main(){ float a,b,c,d,e,f; float x,y; while(1){ a=-2000; scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f); if(a<=-1000){ break; } x=(b*f-c*e)/(b*d-a*e); y=(c*d-a*f)/(b*d-a*e); x=roundf(x,3); y=roundf(y,3); printf("%.3f %.3f\n",x,y); } return 0; }
main.c: In function 'main': main.c:18:11: error: too many arguments to function 'roundf' 18 | x=roundf(x,3); | ^~~~~~ In file included from main.c:2: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:334:1: note: declared here 334 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__)); | ^~~~~~~~~~~ main.c:19:11: error: too many arguments to function 'roundf' 19 | y=roundf(y,3); | ^~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:334:1: note: declared here 334 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__)); | ^~~~~~~~~~~
s204418348
p00004
C
#include <stdio.h> #include <math.h> int main(void){ float a,b,c,d,e,f; float x,y; float tmp1,tmp2; while(1){ a = 2000; scanf("%.3f %.3f %.3f %.3f %.3f %.3f", &a, &b, &c, &d, &e, &f); if(a == 2000)break; tmp1 = c*e - b*f; tmp2 = a*e - b*d; x = tmp1 / tmp2; tmp1 = a*f - c*d; tmp2 = a*e - b*d; y = tmp1 / tmp2; if(x > 0.0){ x = floor(x + 0.0005) } else { x = -1 * floor(fabs(x) + 0.0005); } if(y > 0.0){ x = floor(x + 0.0005) } else { y = -1 * floor(fabs(y) + 0.0005); } printf("%.3f %.3f\n", x, y); } return 0; }
main.c: In function 'main': main.c:22:34: error: expected ';' before '}' token 22 | x = floor(x + 0.0005) | ^ | ; 23 | } | ~ main.c:29:34: error: expected ';' before '}' token 29 | x = floor(x + 0.0005) | ^ | ; 30 | } | ~
s544670246
p00004
C
#include <stdio.h> int main(){ int a, b, c, d, e, f; double x, y; while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &f) != EOF)J{ x = (double)(e*c - b*f)/(e*a - b*d); y = (double)(c*d - a*f)/(b*d - a*e); printf("%.3f %.3f\n", ); } return 0; }
main.c: In function 'main': main.c:5:64: error: 'J' undeclared (first use in this function) 5 | while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &f) != EOF)J{ | ^ main.c:5:64: note: each undeclared identifier is reported only once for each function it appears in main.c:5:65: error: expected ';' before '{' token 5 | while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &f) != EOF)J{ | ^ | ;
s195498131
p00004
C
#include<stdio.h> int main() { double a,b,c,d,e,f,x,y; printf("ax+by=c\n"); scanf("%lf%lf%lf",&a,&b,&c); printf("dx+ey=f\n"); scanf("%lf%lf%lf",&d,&e,&f); if(((a*e-d*b)!=0)&&((b*d-e*a)!=0)) { x=(c*e-f*b)/(a*e-d*b); y=(c*d-f*a)/(b*d-e*a); printf("%.3lf %.3lf\n",x,y); } else if(((a*e-d*b)==0)&&((b*d-e*a)==0)&&((c*e-f*b)==0)&&((c*d-f*a)==0)) { printf("Infinitely many solutions are possible\n"); printf("The value of x can be varied and y can be calculated according to x's value using relation\n"); printf("y=%lf+(%lf)x",(c/b),(-1*a/b)); } else if(((a*e-d*b)==0)&&((b*d-e*a)==0)&&((c*e-f*b)!=0)&&((c*d-f*a)!=0)) printf("No solutions are possible\n"); getch(); }
main.c: In function 'main': main.c:25:1: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration] 25 | getch(); | ^~~~~ | getc
s184171569
p00004
C
#include <stdio.h> int main(void) { int a, b, c, d, e, f; double x, y; while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) { y = (double)(d * c - a * f) / (b * d - a * e); x = (double)(e * c - b * f) / (a * e - d * b); if (x > -0.0005 && x <= 0) x = 0; if (y > -0.0005 && y <= 0) y = 0; printf("%.3f %.3f\n", x, y); return 0; }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s758501890
p00004
C
#include <stdio.h> int main(){ double a,b,c,d,e,f; double x,y; double det; double inv[2][2]; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d,&e, &f) != EOF) { printf("%f %f %f %f %f %f \n",a,b,c,d,e,f); det = a*e-b*d; inv[0][0] = e/det; inv[0][1] = -b/det; inv[1][0] = -d/det; inv[1][1] = a/det; x = inv[0][0] * c + inv[0][1] * f; y = inv[1][0] * c + inv[1][1] * f; printf("%.3f %.3f\n", x+0.0004, y +0.0004); } return 0; }
main.c: In function 'main': main.c:11:24: warning: missing terminating " character 11 | printf("%f %f %f %f %f %f | ^ main.c:11:24: error: missing terminating " character 11 | printf("%f %f %f %f %f %f | ^~~~~~~~~~~~~~~~~~ main.c:13:1: error: stray '\' in program 13 | \n",a,b,c,d,e,f); | ^ main.c:13:3: warning: missing terminating " character 13 | \n",a,b,c,d,e,f); | ^ main.c:13:3: error: missing terminating " character 13 | \n",a,b,c,d,e,f); | ^~~~~~~~~~~~~~~ main.c:13:2: error: 'n' undeclared (first use in this function) 13 | \n",a,b,c,d,e,f); | ^ main.c:13:2: note: each undeclared identifier is reported only once for each function it appears in main.c:13:3: error: expected ')' before 'det' 13 | \n",a,b,c,d,e,f); | ^ | ) 14 | det = a*e-b*d; | ~~~ main.c:11:23: note: to match this '(' 11 | printf("%f %f %f %f %f %f | ^ main.c:23:10: error: expected ';' before '}' token 23 | +0.0004); | ^ | ; 24 | } | ~
s176819112
p00004
C
#include <stdio.h> int main(void) { double a[6], i, acopy, x , y; while (scanf ("%lf %lf %lf %lf %lf %lf", &a[0], &a[1], &a[2], &a[3], &a[4], &a[5])!= EOF){ acopy = a[1]; for (i = 0; i < 3; i++) { a[i] *= a[4]; } for (i = 3; i < 6; i++) { a[i] *= acopy; } a[0] -= a[3]; if (a[0] == 0) x = 0; else { a[2] -= a[5]; x = a[2] / a[0]; } acopy = a[5] - (a[3] * x); y = acopy / a[4]; printf("%.3f, %.3f\n", x, y); } return (0); }
main.c: In function 'main': main.c:11:26: error: array subscript is not an integer 11 | a[i] *= a[4]; | ^ main.c:15:26: error: array subscript is not an integer 15 | a[i] *= acopy; | ^
s530095067
p00004
C
#include <stdio.h> int main(){ signed int a,b,c,d,e,f; float x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ a=a*d; b=b*d; c=c*d; d=d*a; e=e*a; f=f*a; y=(c-f)/(b-e); x=(c-by)/a; printf("%3d %3d",x,y); } return(0) }
main.c: In function 'main': main.c:16:22: error: 'by' undeclared (first use in this function); did you mean 'y'? 16 | x=(c-by)/a; | ^~ | y main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in main.c:21:18: error: expected ';' before '}' token 21 | return(0) | ^ | ; 22 | } | ~
s271794927
p00004
C
#include <stdio.h> int main(){ signed int a,b,c,d,e,f; float x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){ a=a*d; b=b*d; c=c*d; d=d*a; e=e*a; f=f*a; y=(c-f)/(b-e); x=(c-b*y)/a; printf("%3f %3f",x,y); } return(0) }
main.c: In function 'main': main.c:21:18: error: expected ';' before '}' token 21 | return(0) | ^ | ; 22 | } | ~
s123293217
p00004
C
#include <stdio.h> int main(){ signed int a,b,c,d,e,f; float x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != -1){ a=a*d; b=b*d; c=c*d; d=d*a; e=e*a; f=f*a; y=(c-f)/(b-e); x=(c-b*y)/a; printf("%.3f %.3f\n",x,y); } return(0) }
main.c: In function 'main': main.c:21:18: error: expected ';' before '}' token 21 | return(0) | ^ | ; 22 | } | ~
s439925161
p00004
C
include <stdio.h> int main() { double a,b,c,d,e,f; double x,y; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); y=(a*f-c*d)/(a*e-b*d); x=((-1)*b*y+c)/a; printf("%.3lf %.3lf\n",x,y); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s341486854
p00004
C
include <stdio.h> int main() { double a,b,c,d,e,f; double x,y; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); y=(a*f-c*d)/(a*e-b*d); x=((-1)*b*y+c)/a; printf("%.3lf %.3lf\n",x,y); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s348757959
p00004
C
include <stdio.h> int main() { double a,b,c,d,e,f; double x,y; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); y=(a*f-c*d)/(a*e-b*d); x=((-1)*b*y+c)/a; printf("%.3lf %.3lf\n",x,y); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s420082483
p00004
C
#include<stdio.h> int main(){ float buf[12],n,x,y; if(scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])>0{ n=buf[0]; buf[0]=buf[0]/n; buf[1]=buf[0]/n; buf[2]=buf[0]/n; n=buf[3]; buf[3]=buf[3]/n; buf[4]=buf[3]/n; buf[5]=buf[3]/n; buf[6]=buf[0]-buf[3]; buf[7]=buf[1]-buf[4]; buf[8]=buf[2]-buf[5]; buf[9]=buf[0]; n=buf[7]; buf[10]=buf[7]/n; buf[11]=buf[8]/n; y=buf[11]; x=buf[2]-(buf[1]*y); printf("%f %f\n",x,y); } return 0; }
main.c: In function 'main': main.c:7:74: error: expected ')' before '{' token 7 | if(scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])>0{ | ~ ^ | ) main.c:35:1: error: expected expression before '}' token 35 | } | ^
s931842323
p00004
C
#include<stdio.h> int main(){ float buf[12],n,m,x,y; scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5]) m=buf[0]; n=buf[3]; buf[0]*=n; buf[1]*=n; buf[2]*=n; buf[3]*=m; buf[4]*=m; buf[5]*=m; buf[6]=buf[0]-buf[3]; buf[7]=buf[1]-buf[4]; buf[6]=buf[2]-buf[5]; y=buf[8]/buf[7]; x=(buf[2]-(buf[1]*y))/buf[0]; printf("%f %f\n",x,y); return 0; }
main.c: In function 'main': main.c:7:69: error: expected ';' before 'm' 7 | scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5]) | ^ | ; 8 | 9 | m=buf[0]; | ~
s266417703
p00004
C
#include <stdio.h> #include <math.h> int main(){ int i; double a[6]; double x,y; while(scanf("%lf",&a[0])!=EOF){ for(i=1;i<6;i++)scanf("%lf",&a[i]); x = (a[4]*a[2]-a[5]*a[1])/(a[4]*a[0]-a[3]*a[1]); if(x==0) x=abs(x); y = (a[3]*a[2]-a[5]*a[0])/(a[3]*a[1]-a[4]*a[0]); if(y==0) y=abs(y); printf("%.3f %.3f\n",x,y); }
main.c: In function 'main': main.c:16:12: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration] 16 | if(x==0) x=abs(x); | ^~~ main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs' 2 | #include <math.h> +++ |+#include <stdlib.h> 3 | main.c:16:16: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 16 | if(x==0) x=abs(x); | ^ <built-in>: note: built-in 'abs' declared here main.c:20:16: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 20 | if(y==0) y=abs(y); | ^ <built-in>: note: built-in 'abs' declared here main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s793152649
p00004
C
#include <stdio.h> #include <math.h> int main(){ int i; double a[6]; double x,y; while(scanf("%lf",&a[0])!=EOF){ for(i=1;i<6;i++)scanf("%lf",&a[i]); x = (a[4]*a[2]-a[5]*a[1])/(a[4]*a[0]-a[3]*a[1]); if(x==0) x=abs(x); y = (a[3]*a[2]-a[5]*a[0])/(a[3]*a[1]-a[4]*a[0]); if(y==0) y=abs(y); printf("%.3f %.3f\n",x,y); }
main.c: In function 'main': main.c:16:12: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration] 16 | if(x==0) x=abs(x); | ^~~ main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs' 2 | #include <math.h> +++ |+#include <stdlib.h> 3 | main.c:16:16: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 16 | if(x==0) x=abs(x); | ^ <built-in>: note: built-in 'abs' declared here main.c:20:16: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 20 | if(y==0) y=abs(y); | ^ <built-in>: note: built-in 'abs' declared here main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s983837517
p00004
C
##include<stdio.h> int main(){ int input[6]; int dial,i;; double x,y; while(scanf("%d %d %d %d %d %d",&input[0],&input[1],&input[2],&input[3],&input[4],&input[5])!=EOF){ dial=input[3]; if(input[0]==dial){ input[4]=input[4]-input[1]; input[5]=input[5]-input[2]; y=(double)input[5]/input[4]; x=(double)(input[2]-(input[1]*y))/input[0]; printf("\nC\n%d %d %d\n%d %d %d \n",input[0],input[1],input[2],input[3],input[4],input[5]); } else if(input[1]==input[4]){ input[3]=input[3]-input[0]; input[5]=input[5]-input[2]; x=(double)input[5]/input[3]; y=(double)(input[2]-(input[0]*x))/input[1]; printf("\nC\n%d %d %d\n%d %d %d \n",input[0],input[1],input[2],input[3],input[4],input[5]); } else{ input[0]=input[0]*dial; input[1]=input[1]*dial; input[2]=input[2]*dial; dial=input[0]/dial; input[3]=input[3]*dial; input[4]=input[4]*dial; input[5]=input[5]*dial; input[4]=input[4]-input[1]; input[5]=input[5]-input[2]; y=(double)input[5]/input[4]; x=(double)(input[2]-(input[1]*y))/input[0]; printf("\nC\n%d %d %d\n%d %d %d \n",input[0],input[1],input[2],input[3],input[4],input[5]); } printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c:1:1: error: stray '##' in program 1 | ##include<stdio.h> | ^~ main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | ##include<stdio.h> | ^
s181805503
p00004
C
#include<stdio.h> int main(){ int input[6]; int dial,i;; double x,y; while(scanf("%d %d %d %d %d %d",&input[0],&input[1],&input[2],&input[3],&input[4],&input[5])!=EOF){ dial=input[3]; if(input[0]==dial){ input[4]=input[4]-input[1]; input[5]=input[5]-input[2]; y=(double)input[5]/input[4]; x=(double)(input[2]-(input[1]*y))/input[0]; } else if(input[1]==input[4]){ input[3]=input[3]-input[0]; input[5]=input[5]-input[2]; x=(double)input[5]/input[3]; y=(double)(input[2]-(input[0]*x))/input[1]; } else{ input[0]=input[0]*dial; input[1]=input[1]*dial; input[2]=input[2]*dial; dial=input[0]/dial; input[3]=input[3]*dial; input[4]=input[4]*dial; input[5]=input[5]*dial; input[4]=input[4]-input[1]; input[5]=input[5]-input[2]; y=(double)input[5]/input[4]; x=(double)(input[2]-(input[1]*y))/input[0]; } if(x==-0.000) printf("0.000 %.3lf\n",y); else if(y==-0.000){ printf("%.3lf 0.000\n",x); else printf("%lf %lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:39:17: error: expected '}' before 'else' 39 | else | ^~~~
s451550434
p00004
C
#include<stdio.h> double matrix_x(int,int); double matrix_y(int,int,int,int,int,int); double sisyagonyu(double); int main() { int a,b,c,d,e,f,count=0; double x,y,a1,d1; while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF) count++; for(i=0;i<count;i++){ printf("%f %f\n",matrix_x(a,c),matrix_y(a,b,c,d,e,f)); } return 0; } double matrix_x(int a,int c){ return sisyagonyu((double)c/a); } double matrix_y(int a,int b,int c,int d,int e,int f){ double y; y=((double)f-(double)c*d/a)/((double)e-(double)b*d/a); return sisyagonyu(y); } double sisyagonyu(double n){ int n1; n1=n*10000 if(n1%10>=5) n1+=10; n1/=10; return (double)n1/1000; }
main.c: In function 'main': main.c:14:5: error: 'i' undeclared (first use in this function) 14 | for(i=0;i<count;i++){ | ^ main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'sisyagonyu': main.c:33:11: error: expected ';' before 'if' 33 | n1=n*10000 | ^ | ; 34 | if(n1%10>=5) n1+=10; | ~~
s776440579
p00004
C
#include<stdio.h> double matrix_x(int,int,int,int,int,int); double matrix_y(int,int,int,int,int,int); double sisyagonyu(double); int main() { int a[10],b[10],c[10],d[10],e[10],f[10],count=0,i; double x,y,a1,d1; while(scanf("%d%d%d%d%d%d",&a[count],&b[count],&c[count],&d[count],&e[count],&f[count])!=EOF) count++; for(i=0;i<count;i++){ printf("%f %f\n",sisyagosyu(matrix_x(a[i],b[i],c[i],d[i],e[i],f[i])),sisyagonyu(matrix_y(a[i],b[i],c[i],d[i],e[i],f[i]))); } return 0; } double matrix_x(int a,int b,int c,int d,int e,int f){ return (double)c/a-matrix_y(a,b,c,d,e,f)*b/a; } double matrix_y(int a,int b,int c,int d,int e,int f){ double y; y=((double)f-(double)c*d/a)/((double)e-(double)b*d/a); return y; } double sisyagonyu(double n){ int n1; n1=n*10000; if(n1%10>=5) n1+=10; n1/=10; return (double)n1/1000; }
main.c: In function 'main': main.c:15:18: error: implicit declaration of function 'sisyagosyu'; did you mean 'sisyagonyu'? [-Wimplicit-function-declaration] 15 | printf("%f %f\n",sisyagosyu(matrix_x(a[i],b[i],c[i],d[i],e[i],f[i])),sisyagonyu(matrix_y(a[i],b[i],c[i],d[i],e[i],f[i]))); | ^~~~~~~~~~ | sisyagonyu
s402297514
p00004
C
#include<stdio.h> typedef struct _Node{ int a,b,c,d,e,f; double x,y; struct _Node *next }Node int main(){ Node *head,*p; p=malloc(sizeof(Node)); head=p; while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ p->next=malloc(sizeof(Node)); p=p->next; } p->next=NULL; p=head; while(p!=NULL){ p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) p->y=c-(a*x); printf("%.3f %.3f\n",p->x,p->y); p=p->next; } return 0; }
main.c:7:1: warning: no semicolon at end of struct or union 7 | }Node | ^ main.c:7:6: error: expected ';' before 'int' 7 | }Node | ^ | ; 8 | 9 | int main(){ | ~~~ main.c: In function 'main': main.c:10:3: error: unknown type name 'Node' 10 | Node *head,*p; | ^~~~ main.c:11:5: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | main.c:11:5: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:11:5: note: include '<stdlib.h>' or provide a declaration of 'malloc' main.c:11:19: error: 'Node' undeclared (first use in this function) 11 | p=malloc(sizeof(Node)); | ^~~~ main.c:11:19: note: each undeclared identifier is reported only once for each function it appears in main.c:13:36: error: request for member 'a' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:13:41: error: request for member 'b' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:13:46: error: request for member 'c' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:13:51: error: request for member 'd' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:13:56: error: request for member 'e' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:13:61: error: request for member 'f' in something not a structure or union 13 | while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ | ^~ main.c:14:6: error: request for member 'next' in something not a structure or union 14 | p->next=malloc(sizeof(Node)); | ^~ main.c:15:8: error: request for member 'next' in something not a structure or union 15 | p=p->next; | ^~ main.c:17:4: error: request for member 'next' in something not a structure or union 17 | p->next=NULL; | ^~ main.c:20:6: error: request for member 'x' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:12: error: request for member 'c' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:18: error: request for member 'a' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:32: error: request for member 'f' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:37: error: request for member 'd' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:46: error: request for member 'b' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:52: error: request for member 'a' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:66: error: request for member 'e' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:71: error: request for member 'd' in something not a structure or union 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^~ main.c:20:77: error: expected ';' before 'p' 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^ | ; 21 | p->y=c-(a*x); | ~ main.c:22:27: error: request for member 'x' in something not a structure or union 22 | printf("%.3f %.3f\n",p->x,p->y); | ^~ main.c:22:32: error: request for member 'y' in something not a structure or union 22 | printf("%.3f %.3f\n",p->x,p->y); | ^~ main.c:23:8: error: request for member 'next' in something not a structure or union 23 | p=p->next; | ^~
s339961622
p00004
C
#include<stdio.h> typedef struct _Node{ int a,b,c,d,e,f; double x,y; struct _Node *next; }Node; int main(){ Node *head,*p; p=malloc(sizeof(Node)); head=p; while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ p->next=malloc(sizeof(Node)); p=p->next; } p->next=NULL; p=head; while(p!=NULL){ p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) p->y=c-(a*x); printf("%.3f %.3f\n",p->x,p->y); p=p->next; } return 0; }
main.c: In function 'main': main.c:11:5: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | main.c:11:5: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:11:5: note: include '<stdlib.h>' or provide a declaration of 'malloc' main.c:20:77: error: expected ';' before 'p' 20 | p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))) | ^ | ; 21 | p->y=c-(a*x); | ~
s602621278
p00004
C
#include<stdio.h> typedef struct _Node{ int a,b,c,d,e,f; double x,y; struct _Node *next; }Node; int main(){ Node *head,*p; p=malloc(sizeof(Node)); head=p; while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){ p->next=malloc(sizeof(Node)); p=p->next; } p->next=NULL; p=head; while(p!=NULL){ p->x=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))); p->y=c-(a*x); printf("%.3f %.3f\n",p->x,p->y); p=p->next; } return 0; }
main.c: In function 'main': main.c:11:5: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | main.c:11:5: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch] 11 | p=malloc(sizeof(Node)); | ^~~~~~ main.c:11:5: note: include '<stdlib.h>' or provide a declaration of 'malloc' main.c:21:10: error: 'c' undeclared (first use in this function) 21 | p->y=c-(a*x); | ^ main.c:21:10: note: each undeclared identifier is reported only once for each function it appears in main.c:21:13: error: 'a' undeclared (first use in this function) 21 | p->y=c-(a*x); | ^ main.c:21:15: error: 'x' undeclared (first use in this function) 21 | p->y=c-(a*x); | ^
s357703684
p00004
C
#include<stdio.h> #include<stdlib.h> typedef struct _Node{ int a,b,c,d,e,f; double x,y; struct _Node *next; }Node; int main(){ int i; Node *head,*p; p=(Node *)calloc(1,sizeof(Node)); head=p; for(i=0;i<2;i++){ scanf("%d %d %d %d %d %d",&p->a,&p->b,&p->c,&p->d,&p->e,&p->f)); p->next=(Node *)calloc(1,sizeof(Node)); p=p->next; } p->next=NULL; p=head; while(p->next!=NULL){ p->y=(p->c-(p->a*(double)(p->f/p->d)))/(p->b-(p->a*(double)(p->e/p->d))); p->x=(p->c-(p->b*p->y))/p->a; printf("%.3f %.3f\n",p->x,p->y); p=p->next; } return 0; }
main.c: In function 'main': main.c:16:67: error: expected ';' before ')' token 16 | scanf("%d %d %d %d %d %d",&p->a,&p->b,&p->c,&p->d,&p->e,&p->f)); | ^ | ; main.c:16:67: error: expected statement before ')' token
s045650556
p00004
C
#include<stdio.h> int main() { double a,b,c,d,e,f,x,y; while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) { x = (c*e - b*f) / (a*e - d*b); y = (c*d - a*f) / (b*d - a*e); if (x > -0.0005 && x < 0) { x = 0; } if (y > -0.0005 && y < 0) { y = 0; } printf("%.3f %.3f\n",x,y); }
main.c: In function 'main': main.c:15:9: error: expected declaration or statement at end of input 15 | } | ^
s988492733
p00004
C
#include<stdio.h> #include<math.h> int main(){ char buf[18]; double a,b,c,d,e,f,x,y; while(fgets(buf,sizeof(buf),stdin)!=NULL){ sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f); x=(b*f-c*e)/(b*d-a*e); y=-1.0*(x*a-c)/b; printf("%.3lf %.3lf\n",x==0.0 ? fabs(x) : x, y==0.0 ? fabs(y) : y); } return 0; }
main.c: In function 'main': main.c:8:17: error: implicit declaration of function 'sscanf_s'; did you mean 'sscanf'? [-Wimplicit-function-declaration] 8 | sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f); | ^~~~~~~~ | sscanf
s388811358
p00004
C
#include<stdio.h> #include<math.h> int main(){ double a,b,c,d,e,f,x,y; while(scanf_s("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ x=(b*f-c*e)/(b*d-a*e); y=-1.0*(x*a-c)/b; printf("%.3lf %.3lf\n",x==0.0 ? fabs(x) : x, y==0.0 ? fabs(y) : y); } return 0; }
main.c: In function 'main': main.c:6:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | while(scanf_s("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ | ^~~~~~~ | scanf
s841930987
p00004
C
#include <stdio.h> int main() { int a, b, c, d, e, f; // x = (bf-ce) / (bd-ae) // y = (cd-af) / (bd-ae) while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){ printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); } return 0; }
main.c: In function 'main': main.c:9:52: error: 'EOf' undeclared (first use in this function); did you mean 'EOF'? 9 | while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){ | ^~~ | EOF main.c:9:52: note: each undeclared identifier is reported only once for each function it appears in main.c:10:33: error: 'bf' undeclared (first use in this function); did you mean 'f'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | f main.c:10:36: error: 'ce' undeclared (first use in this function); did you mean 'e'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | e main.c:10:48: error: 'bd' undeclared (first use in this function); did you mean 'd'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | d main.c:10:51: error: 'ae' undeclared (first use in this function); did you mean 'e'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | e main.c:10:64: error: 'cd' undeclared (first use in this function); did you mean 'd'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | d main.c:10:67: error: 'af' undeclared (first use in this function); did you mean 'f'? 10 | printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae)); | ^~ | f
s872598078
p00004
C
#include <stdio.h> int main() { int a, b, c, d, e, f; // x = (bf-ce) / (bd-ae) // y = (cd-af) / (bd-ae) while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){ printf("%.3f %.3f\n", (float)(b*f-c*e)/(float)(b*d-a*e), (float)(c*d-a*f)/(float)(b*d-a*e)); } return 0; }
main.c: In function 'main': main.c:9:52: error: 'EOf' undeclared (first use in this function); did you mean 'EOF'? 9 | while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){ | ^~~ | EOF main.c:9:52: note: each undeclared identifier is reported only once for each function it appears in
s401705976
p00004
C
#include<stdio.h> int main() { ? ?int a,b,c,d,e,f; ? ?float x,y; ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); ? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF) ? ?{ ? ? ? ?x=(c*e-b*f)/(a*c-b*d); ? ? ? ?y=(c*d-a*f)/(b*d-a*e); ? ? ? ?printf(".3%f .3%f",x,y); ? ?} ? ?return 0; }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ? ?int a,b,c,d,e,f; | ^ main.c:5:1: error: expected expression before '?' token 5 | ? ?float x,y; | ^ main.c:6:1: error: expected expression before '?' token 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:28: error: 'a' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:28: note: each undeclared identifier is reported only once for each function it appears in main.c:6:31: error: 'b' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:34: error: 'c' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:37: error: 'd' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:40: error: 'e' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:43: error: 'f' undeclared (first use in this function) 6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); | ^ main.c:7:1: error: expected expression before '?' token 7 | ? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF) | ^
s852745716
p00004
C
#include<stdio.h> main() { int a,b,c,d,e,f; float x,y; a*x+b*y=c; d*x+e*y=f; scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f); { x=((c*e-b*f)/(a*e-b*d)); y=((a*f-d*c)/(a*e-b*d)); } printf("%.3f %.3f",x,y); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:6:8: error: lvalue required as left operand of assignment 6 | a*x+b*y=c; | ^ main.c:7:8: error: lvalue required as left operand of assignment 7 | d*x+e*y=f; | ^
s856199606
p00004
C
#include<stdio.h> int main() { ? ?float a,b,c,d,e,f; ? ?float x,y; ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); ? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF) ? ?{ ? ? ? ?x=(c*e-b*f)/(a*e-b*d)*1.000; ? ? ? ?y=(c*d-a*f)/(b*d-a*e)*1.000; ? ? ? ?printf("%.3f %.3f\n",x,y); ? ?} ? ?return 0; }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ? ?float a,b,c,d,e,f; | ^ main.c:5:1: error: expected expression before '?' token 5 | ? ?float x,y; | ^ main.c:6:1: error: expected expression before '?' token 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:28: error: 'a' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:28: note: each undeclared identifier is reported only once for each function it appears in main.c:6:31: error: 'b' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:34: error: 'c' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:37: error: 'd' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:40: error: 'e' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:6:43: error: 'f' undeclared (first use in this function) 6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f); | ^ main.c:7:1: error: expected expression before '?' token 7 | ? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF) | ^
s566741704
p00004
C
#include<stdio.h> int main() { int a,b,c,d,e,f,x,y; printf("Enter number:"); scanf("%d%d",&x,&y); if(f(-1,000 ? a, b, c, d, e, f ? 1,000)!=EOF) { printf("%d%d",ax +by = c); printf("%d%d",dx + ey = f); } else printf("Input invalid"); return 0; }
main.c: In function 'main': main.c:7:43: error: expected ':' before ')' token 7 | if(f(-1,000 ? a, b, c, d, e, f ? 1,000)!=EOF) | ^ | : main.c:7:8: error: called object 'f' is not a function or function pointer 7 | if(f(-1,000 ? a, b, c, d, e, f ? 1,000)!=EOF) | ^ main.c:4:19: note: declared here 4 | int a,b,c,d,e,f,x,y; | ^ main.c:10:23: error: 'ax' undeclared (first use in this function); did you mean 'x'? 10 | printf("%d%d",ax +by = c); | ^~ | x main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in main.c:10:27: error: 'by' undeclared (first use in this function); did you mean 'y'? 10 | printf("%d%d",ax +by = c); | ^~ | y main.c:11:23: error: 'dx' undeclared (first use in this function); did you mean 'x'? 11 | printf("%d%d",dx + ey = f); | ^~ | x main.c:11:28: error: 'ey' undeclared (first use in this function); did you mean 'y'? 11 | printf("%d%d",dx + ey = f); | ^~ | y