submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s637134893
p00466
C
#include <stdio.h> int main(){ int sum,n,i,a,k,; sum=0; while(1){ scanf("%d",&a); if(a==0){ return 0; } for(i=0;i<9;i++){ scanf("%d",&n); sum+=n; } k=a-sum; printf("%d\n",k); } }
main.c: In function 'main': main.c:3:19: error: expected identifier or '(' before ';' token 3 | int sum,n,i,a,k,; | ^
s510160738
p00466
C
for(i=0;i<9;i++){ scanf("%d",&n); sum+=n; } k=a-sum; scanf("%d",&a); printf("%d\n",k); }
main.c:1:3: error: expected identifier or '(' before 'for' 1 | for(i=0;i<9;i++){ | ^~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | for(i=0;i<9;i++){ | ^ main.c:1:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' tok...
s090670498
p00466
C
#include <stdio.h> int main(void) { int sum, x; int i; scanf("%d", &sum); for (i = 1; i < 10; i++) { scanf("%d", &x); sum -= x; } printf("%d\n", sum); return 0;
main.c: In function 'main': main.c:15:9: error: expected declaration or statement at end of input 15 | return 0; | ^~~~~~
s478076309
p00466
C
#include <stdio.h> int main(){ int a,b,c,d; scanf("%d",&a); for(i=0;i<9;i++){ scanf("%d",b); c+=b; } d=a-c; printf("%d\n",d); return 0; }
main.c: In function 'main': main.c:6:13: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<9;i++){ | ^ main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
s037871940
p00466
C
#include <stdio.h> int main(){ int a,b,c=0,d,i; while(1){ c=0 scanf("%d",&a); if(a==0){ return 0; } for(i=0;i<9;i++){ scanf("%d",&b); c+=b; } d=a-c; printf("%d\n",d); } }
main.c: In function 'main': main.c:6:20: error: expected ';' before 'scanf' 6 | c=0 | ^ | ; 7 | scanf("%d",&a); | ~~~~~
s940773023
p00466
C
N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}}
main.c:1:1: warning: data definition has no type or storage class 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int'...
s868323139
p00466
C
#include <stdio.h> int main(void) { int total; int sum = {0}; int n; int book; scanf("%d", &total); for (n = 1; n <= 9; n++){ scanf("%d", &book); sum += book; } printf ("%d\n", total - sum); return (0); } #include <stdio.h> int main(void) { int total; int sum = {0}; int n; int book; ...
main.c:26:5: error: redefinition of 'main' 26 | int main(void) | ^~~~ main.c:3:5: note: previous definition of 'main' with type 'int(void)' 3 | int main(void) | ^~~~
s411923681
p00466
C
#include <stdio.h> int main(void) { int b[10]={0}; int i; for(i=0;i<10;i++){ scanf("%d",&b[i]); if(b[i]==0) break; } for(i=1;i<10;i++) b[0]-=v[i]; printf("%d\n",b[0]); return 0;} }
main.c: In function 'main': main.c:13:23: error: 'v' undeclared (first use in this function) 13 | b[0]-=v[i]; | ^ main.c:13:23: note: each undeclared identifier is reported only once for each function it appears in main.c: At top level: main.c:18:1: error: expected identif...
s234918359
p00466
C
#include<stdio.h> int main(void){ int i; int a,b=0,c; while(){ scanf("%d",&a); if(a==0)return 0; for(i=0;i<10;i++){ scanf("%d",&c); b+=c; } printf("%d\n",a-b); } return 0; }
main.c: In function 'main': main.c:5:15: error: expected expression before ')' token 5 | while(){ | ^
s235957477
p00466
C
#include <iostream> #define Iset int i,j,l; using namespace std; int main() { int a, b[11], c=0; Iset; cin >> a; for (i = 0; i < 9; i++) { cin >> b[i]; c += b[i]; } cout << a-c << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s700000186
p00466
C
#include<stdio.h> int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;}
main.c: In function 'main': main.c:2:55: error: break statement not within loop or switch 2 | int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;} | ^~~~~ main.c: At top level:...
s818477961
p00466
C
#include <cstdio> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(flg == 0){ scanf("%d", &hiku); if(hiku == 0) flg = 1; sum -= hiku; } printf("%d", sum); return 0; }
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s823987903
p00466
C
#include <stdio.h> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(int i = 0; i < 9; i++){ scanf("%d", &hiku); if(hiku == 0) flg = 1; sum -= hiku; } printf("%d", sum); return 0; }
main.c: In function 'main': main.c:6:15: error: expected expression before 'int' 6 | while(int i = 0; i < 9; i++){ | ^~~
s991076587
p00466
C
#include<stdio.h> int main(){ int a, b, c, d, e, f, g, h, i, sum; int sum <= 10000; scanf("%d", &sum); if(sum > 10000) break; scanf("%d\n %d\n %d\n %d\n %d\n %d\n %d\n %d\n %d\n", a, b, c, d, e, f, g, h, i); printf("%d\n", sum-a-b-c-d-e-f-g-h-i); return 0; }
main.c: In function 'main': main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 5 | int sum <= 10000; | ^~ main.c:5:11: error: expected expression before '<=' token main.c:8:5: error: break statement not within loop or switch 8 | break; | ^~~~~
s533231591
p00466
C
#include <stdio.h> int main(){ int=a,b; scanf("%d",&b); while(b<=10000){ scanf("%d",&a); b=b-a; if(b==0) break; } printf("%d",b); return 0; }
main.c: In function 'main': main.c:3:4: error: expected identifier or '(' before '=' token 3 | int=a,b; | ^ main.c:4:13: error: 'b' undeclared (first use in this function) 4 | scanf("%d",&b); | ^ main.c:4:13: note: each undeclared identifier is reported only once for each function it ...
s385183258
p00466
C
#include<stdio.h> int main(void) { int x,y; int a,b,c,d,e,f,g,h,i,; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&e); scanf("%d",&f); scanf("%d",&g); scanf("%d",&h); scanf("%d",&i); y=x-a-b-c-d-e-f-g-h-i; printf("%d\n",y); return 0; }
main.c: In function 'main': main.c:5:25: error: expected identifier or '(' before ';' token 5 | int a,b,c,d,e,f,g,h,i,; | ^
s856763580
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum); for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i] } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:8:25: error: expected ';' before '}' token 8 | sum -= book[i] | ^ | ; 9 | } | ~
s933094357
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d\n",&sum) for(i=0;i<9;i++){ scanf("%d\n",&book[i]); sum -= book[i]; } } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:5:24: error: expected ';' before 'for' 5 | scanf("%d\n",&sum) | ^ | ; 6 | for(i=0;i<9;i++){ | ~~~ main.c: At top level: main.c:11:22: error: expected declaration specifiers or '......
s236526909
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d\",&sum) for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum=0; return 0; }
main.c: In function 'main': main.c:5:12: warning: missing terminating " character 5 | scanf("%d\",&sum) | ^ main.c:5:12: error: missing terminating " character 5 | scanf("%d\",&sum) | ^~~~~~~~~~~ main.c:6:8: error: expected expression before 'for' 6 | for(i...
s058386446
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum) for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum=0; return 0; }
main.c: In function 'main': main.c:5:22: error: expected ';' before 'for' 5 | scanf("%d",&sum) | ^ | ; 6 | for(i=0;i<9;i++){ | ~~~
s748699649
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0) break; for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; return 0; }
main.c: In function 'main': main.c:10:1: error: break statement not within loop or switch 10 | break; | ^~~~~
s495744968
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0){ break; } for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; return 0; }
main.c: In function 'main': main.c:10:7: error: break statement not within loop or switch 10 | break; | ^~~~~
s753079497
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0){ break; }else{ for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; } return 0; }
main.c: In function 'main': main.c:10:7: error: break statement not within loop or switch 10 | break; | ^~~~~
s287464069
p00466
C++
#include <iostream> using namespace std; /** Problem0543 : Receipt **/ int main() { int sum, tmp=0; cin>>sum; rep(i, 9) { int t; cin>>t; tmp += t; } cout << sum-tmp << endl; }
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | rep(i, 9) { | ^ a.cc:9:9: error: 'rep' was not declared in this scope 9 | rep(i, 9) { | ^~~
s782756343
p00466
C++
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<iostream> #include<cstdio> #include<algorithm> #include<string> using namespace std; int main() { while(1){ int sum = 0; int n; cin >> sum; if(sum == 0) break; for(int i = 0; i < 9; i++){ cin >> n; ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a...
s046593694
p00466
C++
#include<iostream> using namespace std; int main(){ int a,b;sum=0; while(cin>>sum){ for(int i=0;i<9;i++){ cin>>b; sum-=b; } cout<<sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:17: error: 'sum' was not declared in this scope 4 | int a,b;sum=0; | ^~~
s276458920
p00466
C++
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; while(cin >>a){ if(a==0){break;} cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>i; ...
a.cc:68:6: error: stray '#' in program 68 | Case # Verdict CPU Time Memory In Out Case Name | ^ a.cc:69:7: error: stray '#' in program 69 | Case #1: : Accepted - - 213 B 23 B test_case_1 | ^ a.cc:77:13: error: stray '#' in program 77 | Judge Input #1 ( in1.txt | 213 B) Judge Output #1...
s171346883
p00466
C++
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; while(cin >>a){ if(a==0){break;} cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>...
a.cc:3:1: error: expected unqualified-id before numeric constant 3 | 2 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a...
s834281560
p00466
C++
#include<iostream> using namespace std; int main () { int main n,m,i; cin >> n; for (i=0;i<9;i++) { cin >> m; n-=m; } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:14: error: expected initializer before 'n' 5 | int main n,m,i; | ^ a.cc:6:12: error: 'n' was not declared in this scope 6 | cin >> n; | ^ a.cc:7:10: error: 'i' was not declared in this scope 7 | for (i=0;i<9;i++) { ...
s691217141
p00466
C++
#include<iostream> using namespace std; int main () { int main n,m,i; cin >> n; for (i=0;i<9;i++) { cin >> m; n-=m; } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:14: error: expected initializer before 'n' 5 | int main n,m,i; | ^ a.cc:6:12: error: 'n' was not declared in this scope 6 | cin >> n; | ^ a.cc:7:10: error: 'i' was not declared in this scope 7 | for (i=0;i<9;i++) { ...
s071690491
p00466
C++
#include<iostream> using namespace std; int main(){ int n; while(cin>>n &n){ for(int i=0;i<9;i++){ int x; cin>>x; n-=x; } cout<<n<<endl; } }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | while(cin>>n &n){ | ~~~~~~ ^~ | | | | | int |...
s782642398
p00466
C++
#include<iostream> using namespace std; int main(){ int n; while(cin>>n &n){ for(int i=0;i<9;i++){ int x; cin>>x; n-=x; } cout<<n<<endl; } }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | while(cin>>n &n){ | ~~~~~~ ^~ | | | | | int |...
s964119065
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9; i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s129675902
p00466
C++
#include<stdio.h> int main(void) { int sougaku=0, money=0, nazo=0; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9; i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s635596193
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; scanf_s("%d", &money); while (money != 0){ nazo = nazo - money; scanf_s("%d", &money); } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s594377301
p00466
C++
#include<stdio.h> int main() { int sougaku, money, nazo; scanf("%d", &sougaku); nazo = sougaku; scanf_s("%d", &money); while (money != 0){ nazo = nazo - money; scanf("%d", &money); } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d", &money); | ^~~~~~~ | scanf
s906911394
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9;i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s465141478
p00466
C++
include<stdio.h> int main(){ int total; int a[9]; int i; scanf("%d",&total); for(i=0;i<9;i++){ scanf("%d",&a[i]); } for(i=0;i<9;i++){ total -= a[i]; } printf("%d\n",total); return(0); }
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s729915023
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m;A for(int n=1; n<10; n++ ){ cin>>k; m-=k; cout<<m<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'A' was not declared in this scope 7 | cin>>m;A | ^ a.cc:8:22: error: 'n' was not declared in this scope 8 | for(int n=1; n<10; n++ ){ | ^
s660651077
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m; for(int n=0; n<9; n++ ){ cin>>k; m-=k; if(k=0){ break; } } cout<<m<<endl; return 0;A }
a.cc: In function 'int main()': a.cc:16:18: error: 'A' was not declared in this scope 16 | return 0;A | ^
s132002325
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; while(true){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:20: error: 'i' was not declared in this scope 9 | if(i==0){ | ^
s947350659
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; while(){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: expected primary-expression before ')' token 8 | while(){ | ^ a.cc:9:20: error: 'i' was not declared in this scope 9 | if(i==0){ | ^
s257572608
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; for(){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: expected primary-expression before ')' token 8 | for(){ | ^ a.cc:20:9: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:27: error: expected ')' before 'return' 19 | cout<...
s054788991
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; cin>>total; for(){ cin>>books; if(books==0){ break; } total-=books; } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before ')' token 9 | for(){ | ^ a.cc:19:9: error: expected primary-expression before 'return' 19 | return 0; | ^~~~~~ a.cc:18:27: error: expected ')' before 'return' 18 | cout<...
s278072712
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total }else{ cin>>books; total-=books; } } cout<<total; return 0; }
a.cc: In function 'int main()': a.cc:10:30: error: expected ';' before '}' token 10 | cin>>total | ^ | ; 11 | }else{ | ~
s057220361
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total; if(total>10000){ break; } }else{ cin>>books; total-=books; ...
a.cc: In function 'int main()': a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream...
s341807507
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total; if(total>10000){ break; } }else{ cin>>books; total-=books; ...
a.cc: In function 'int main()': a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream...
s423567380
p00466
C++
#include<iostream> using namespace std; int main() { int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; cout << 0*a cout << a-(b+c+d+e+f+g+h+i+j) << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ';' before 'cout' 8 | cout << 0*a | ^ | ; 9 | cout << a-(b+c+d+e+f+g+h+i+j) << '\n'; | ~~~~
s585074060
p00466
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f,g,h,i,j,h; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; h=a-b-c-d-e-f-g-h-i-j cout<<h<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:6:27: error: redeclaration of 'int h' 6 | int a,b,c,d,e,f,g,h,i,j,h; | ^ a.cc:6:21: note: 'int h' previously declared here 6 | int a,b,c,d,e,f,g,h,i,j,h; | ^ a.cc:9:24: error: expected ';' before 'cout' 9 | ...
s968924581
p00466
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; k=a-b-c-d-e-f-g-h-i-j cout<<k<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: expected ';' before 'cout' 9 | k=a-b-c-d-e-f-g-h-i-j | ^ | ; 10 | cout<<k<<'\n'; | ~~~~
s311606496
p00466
C++
#include<iostream> using namespace std; int main(){ int goke; int hon; int count=0; while(true){ if(count==0){ cin>>goke; if(goke==0){ break }; count++; } else{ cin>>hon; goke-=hon; count++; } if(count==10){ cout<<goke<<'\n'; count=0; } } return0; }
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before '}' token 13 | break }; | ^~ | ; a.cc:25:9: error: 'return0' was not declared in this scope 25 | return0; | ^~~~~~~
s692776874
p00466
C++
#include<iostream> using namespace std; int main(){ int goke; int hon; int count=0; while(true){ if(count==0){ cin>>goke; if(goke==0){ break; } count++; } else{ cin>>hon; goke-=hon; count++; } if(count==10){ cout<<goke<<'\n'; count=0; } } return0; }
a.cc: In function 'int main()': a.cc:25:9: error: 'return0' was not declared in this scope 25 | return0; | ^~~~~~~
s521868923
p00466
C++
#include <iostream> using namespace std; int main() { while(1){ int n,a,sum=0; cin>>n; if(n==0) break; for(int i=1; i<=9; i++){ cin>>a; sum+=a; cout<<n-sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s528014043
p00466
C++
include<iostream> #include<algorithm> #include<functional> #include<cstdio> #include<vector> #include<map> #include<string> #include<cmath> using namespace std; int main(){ int s; int n; while(cin>>s,s!=0){ for(int i=0;i<9;i++){ cin>>n; s-=n; } cout<<s<<endl; } }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __g...
s337204626
p00466
C++
#include <iostream> using namespace std; int main() { int a,b; if(a=0){ break; } cin>>a; for(int i=0;i<9;i++){ cin>>b; a=a-b; } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:25: error: break statement not within loop or switch 7 | break; | ^~~~~
s715328087
p00466
C++
#include<iostream> using namespace std; int main(){ int books=0; int book=0; cin>>books; while(i<9){ cin>>book; books-=book; if(books==0){ break; } } cout<<books<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | while(i<9){ | ^
s165920343
p00466
C++
#include<iostream> using namespace std; int main(){ int books=0; int book=0; cin>>books; while(i<9){ cin>>book; books-=book; i++; if(books==0){ break; } } cout<<books<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | while(i<9){ | ^
s507852376
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true) if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c==0; } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: break statement not within loop or switch 12 | break; | ^~~~~ a.cc: At global scope: a.cc:15:10: error: expected unqualified-id before 'else' 15 | }else{ | ^~~~ a.cc:20:9: error: expected unqualified-id...
s385056055
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c==0; } return 0; }
a.cc: In function 'int main()': a.cc:15:10: error: 'else' without a previous 'if' 15 | }else{ | ^~~~
s012197143
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c=0; } } return 0; }
a.cc: In function 'int main()': a.cc:15:10: error: 'else' without a previous 'if' 15 | }else{ | ^~~~ a.cc: At global scope: a.cc:25:9: error: expected unqualified-id before 'return' 25 | return 0; | ^~~~~~ a.cc:26:1: error: expected declaration before '}' token 26 |...
s649473789
p00466
C++
#include<iostream> using namespace std; int main(){ int total; cin>>total; int a=0; for(int i=1;i<=9;i++){ cin<<a; a=a+a; } cout<<total-a<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin<<a; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:10:4: note: candidate: 'operator<<(int, int)' ...
s544544544
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ for(c=1;c<10;c++) cin >> book ; total -= book; } if(c==10){ cout << total << '\n'; c=0; } } return 0; }
a.cc: In function 'int main()': a.cc:16:10: error: 'else' without a previous 'if' 16 | }else{ | ^~~~ a.cc: At global scope: a.cc:26:9: error: expected unqualified-id before 'return' 26 | return 0; | ^~~~~~ a.cc:27:1: error: expected declaration before '}' token 27 |...
s361464590
p00466
C++
#include <iostream> using namespace std; int main() { int total,books; while(true) cin>>total; if(total==0){ break; } for(int i=1;i<=9;i++){ cin>>books; total-=books; cout<<total<<"\n"; } return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: break statement not within loop or switch 11 | break; | ^~~~~
s358445213
p00466
C++
#include<iostream> using namespace std; int main() { int num; int a; int b; int c; int d; int e; int f; int g; int h; int i; while(1){ cin >>num; if(num==0){ break;} else{ cin >>a; cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>i; cout<<num-a-b-c-d-e-f-g-h-i\n; }...
a.cc:22:29: error: stray '\' in program 22 | cout<<num-a-b-c-d-e-f-g-h-i\n; | ^ a.cc: In function 'int main()': a.cc:22:29: error: expected ';' before 'n' 22 | cout<<num-a-b-c-d-e-f-g-h-i\n; | ^~ | ;
s474333846
p00466
C++
using namespace std; int main(){ int a,b,i=0,n; cin>>a; do{ if(a>10000){ break; } n=1; cin>>b; a=a-b;i++; if(i==9*n){ cout<<a<<endl;n++; } }while(i<=9*n); return 0; }
a.cc: In function 'int main()': a.cc:4:6: error: 'cin' was not declared in this scope 4 | cin>>a; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:13:6: error: 'c...
s188861664
p00466
C++
#include<iostream> using namespace std; int main(){ int books=1; int book=0; int i=0; while(books!=0){ cin>>books; if(books==0){ break; } while(i<=8){ cin>>book; books-=book; i++; } if(i==9){ cout<<books<<'\n'; i=0; }
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:8:16: note: to match this '{' 8 | while(books!=0){ | ^ a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ...
s985822272
p00466
C++
#include<iostream> using namespace std; int main(){ int total; cin>>total; while(total!=0){ int a,b,c,d,e,f,g,h,i,j; cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; j=total-(a+b+c+d+e+f+g+h+i); cout<<j<<'\n'; cin>>total; } return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:4: note: candidate...
s265910178
p00466
C++
#include<iostream> using namespace std; int main() { int total; cin >> total; //初回の総額入力 while(total != 0){ //読み取れなかった価格の計算 int a,b,c,d,e,f,g,h,i; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i; cin >> total;//2回目以降の総額の入力 } cout << total-(a+b+c+d+e+f+g+h+i); return 0; }
a.cc: In function 'int main()': a.cc:15:24: error: 'a' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:26: error: 'b' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:28...
s826800149
p00466
C++
loop do x = gets.chomp.to_i break if x == 0 9.times do sum = 0; y = gets.chomp.to_i sum += y end print x - sum end
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~ a.cc:6:21: error: 'y' does not name a type 6 | sum = 0; y = gets.chomp.to_i | ^
s046102657
p00466
C++
loop do sum = gets.chomp.to_i break if sum == 0 9.times do x = gets.chomp.to_i sum -= x end puts sum end
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~
s376576210
p00466
C++
#include<stdio.h> int main() { int sum,one; scanf("%d",&sum); for(i=0;i<9;i++){ scanf("%d",&one); sum-=one; } printf("%d",sum); return 0; }
a.cc: In function 'int main()': a.cc:6:7: error: 'i' was not declared in this scope 6 | for(i=0;i<9;i++){ | ^
s090683733
p00466
C++
#include <cstdio> using namespace std; int main() {for(;;){ int s,x; s=0; scanf("%d",&s); if(!s) return 0; for(int i=0;i<10;i++){{ scanf("%d",&x); s-=x; } printf("%d\n",s); } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:4:1: note: to match this '{' 4 | {for(;;){ | ^
s644907651
p00466
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s609465164
p00466
C++
#include <iostream> using namespace std; int main(){ int sum,t; cin >> sum; for(int i = 0;i < 9;i++){ cin >> t; cum -= t; } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'cum' was not declared in this scope; did you mean 'sum'? 9 | cum -= t; | ^~~ | sum
s661489073
p00466
C++
#include <bits/stdc++.h> using namespace std; int main() { int sum; int data; cin >> sum; Rep(i,9) { cin >> data; sum -= data; } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | Rep(i,9) { | ^ a.cc:8:3: error: 'Rep' was not declared in this scope 8 | Rep(i,9) { | ^~~
s948248025
p00466
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s052840745
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a ,c,sum,ans; int b[9] ={}; sum =0; while(1){ cin >> a; if(a == 0)break; for(int i=0;i<9;i++){ cin >> b[i]; } for(int i=0;i<9;i++){ sum += b[i]; } ans = a -sum; cout << ans << endl; sum = 0; }
a.cc: In function 'int main()': a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s834954867
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ if(int i=0;i<5;i++){ int n; cin>>n; int sum = 0; while(1){ int x; cin>>x; if(x == 0) break; sum = sum + x; } cout<<n-sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: expected ')' before ';' token 7 | if(int i=0;i<5;i++){ | ~ ^ | ) a.cc:7:17: error: 'i' was not declared in this scope 7 | if(int i=0;i<5;i++){ | ^
s118174743
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int h; int x; int y; int z; int a; int b; int c; int d; int f; int g; cin>>h>>x>>y>>z>>a>>b>>c>>d>>f>>g; if(h ==0) break; int e =h-x-y-z-a-b-c-d-f-g; cout<<e<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:11: error: break statement not within loop or switch 18 | if(h ==0) break; | ^~~~~
s837567346
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int h; cin>>h; for(int i=0;i<=9;i++){ int sum=0; sum +=i } int e=h-sum; cout<<e<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: expected ';' before '}' token 9 | sum +=i | ^ | ; 10 | 11 | } | ~ a.cc:12:9: error: 'sum' was not declared in this scope 12 | int e=h-sum; | ^~~
s549501210
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N, x[10]; int X = 0; for(int j=0;j < 5;j++){ cin>>N; if(N == 0) break; for(int i=1;i < 10;i++){ cin>>x[i]; X += x[i]; } cout<<N - X<<endl } return 0; }
a.cc: In function 'int main()': a.cc:16:24: error: expected ';' before '}' token 16 | cout<<N - X<<endl | ^ | ; 17 | } | ~
s210454818
p00466
C++
#include<iostream> using namespace std; int main() { for (int i = 0; i < 5; i++) { int x, a, b, c, d, e, f, g, h, i, j; cin >> x >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; cout << x - a - b - c - d - e - f - g - h - i - j << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:48: error: redeclaration of 'int i' 7 | int x, a, b, c, d, e, f, g, h, i, j; | ^ a.cc:6:18: note: 'int i' previously declared here 6 | for (int i = 0; i < 5; i++) { | ^
s591239040
p00466
C++
9850 1050 800 420 380 600 820 2400 1800 980
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9850 | ^~~~
s985612272
p00466
C++
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { int total = sc.nextInt(); if (total == 0)break; for (int i = 0; i < 9; i++) { total -= sc.nextInt(); } System.out.println(total); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main(String args[]) | ^~~~~~~ | : a....
s884941018
p00466
C++
#include <stdio.h> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(int i = 0; i < 9; i++){ scanf("%d", &hiku); sum -= hiku; } printf("%d", sum); return 0; }
a.cc: In function 'int main()': a.cc:6:24: error: expected ')' before ';' token 6 | while(int i = 0; i < 9; i++){ | ~ ^ | ) a.cc:6:26: error: 'i' was not declared in this scope 6 | while(int i = 0; i < 9; i++){ | ...
s004584590
p00466
C++
i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;}
a.cc:1:1: error: 'i' does not name a type 1 | i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;} | ^ a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token 1 | i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;} | ^...
s817144117
p00466
C++
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum); for(i=0;i<9;i++){ while(scanf("%d",&book[i]) != 0){ sum -= book[i]; } printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:2:17: note: to match this '{' 2 | int main(void){ | ^
s711825211
p00466
C++
#include<iostream> using namespace std; int main(){ int sam,p[9]; cin >> sam; if(sam == 0) break; for(int i = 0; i < 9; i++){ cin >> p[i]; } for(int i = 0; i < 9; i++){ sam -= p[i]; } cout << sam << endl; }
a.cc: In function 'int main()': a.cc:9:1: error: break statement not within loop or switch 9 | break; | ^~~~~
s454736407
p00466
C++
#include<iostream> int main(){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> aa[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Lin...
s715754026
p00466
C++
#include<iostream> using namespace std; int main(){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:26: error: 'I' was not declared in this scope 10 | for(int i = 1; i < 10; I++) | ^
s261177379
p00466
C++
#include<iostream> using namespace std; int main(){ while(true){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; if(!aa[0]) break; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:26: error: 'I' was not declared in this scope 13 | for(int i = 1; i < 10; I++) | ^
s601003345
p00466
C++
#include<iostream> using namespace std; int main(){ int n,a; while(){ scanf("%d",&n); if(n==0)break; for(int i=0;i<9;i++){ scanf("%d",&a); n-=a; } printf("%d\n",n); }}
a.cc: In function 'int main()': a.cc:6:7: error: expected primary-expression before ')' token 6 | while(){ | ^
s897560398
p00466
C++
#include <stdio.h> main() { int a,b,i; scanf("%d",&a); if(a==0) break; for(i=1;i<11;i++){ scanf("%d",&b); a-=b; } printf("%d\n",a); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:7:18: error: break statement not within loop or switch 7 | if(a==0) break; | ^~~~~
s884369020
p00466
C++
#include <iostream> using namespace std; int main () { int a,b,c,d,e,f,g,h,i,j; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; if (a==0) break; cout<<a-(b+c+d+e+f+g+h+i+j)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:15: error: break statement not within loop or switch 6 | if (a==0) break; | ^~~~~
s989865039
p00466
C++
#include <iostream> using namespace std; int main() { // your code goes here int sum,r[10],real=0; cin >> sum; for(int i=0;i<10;i++){ cin >> r[i]; real+=r[i]; } for(int i=0;i<10;i++){ if(real-r[i]==sum) cout << r[i] << endl: } return 0; }
a.cc: In function 'int main()': a.cc:14:37: error: expected ';' before ':' token 14 | cout << r[i] << endl: | ^ | ;
s234059478
p00467
Java
package Chapter3; import java.util.Scanner; public class AOJ5_44 { public static void main(String arg[]) { Scanner in = new Scanner(System.in); while(in.hasNext()) { int n=in.nextInt(); int m=in.nextInt(); if((n|m)==0) return; int a[]=new int[n]; int b[]=new int[m]; for(int i=0;i<n;i++) ...
Main.java:4: error: class AOJ5_44 is public, should be declared in a file named AOJ5_44.java public class AOJ5_44 ^ 1 error
s722150635
p00467
C
#include <stdio.h> int a[1000],b[1000]; int main(){ int N,M,i,c=1; while(1){ c=1; scanf("%d %d",&N,&M); if(N==0&&M==0){ return 0; } for(i=0;i<N;i++){ scanf("%d",&a[i]); } for(i=0;i<M;i++){ scanf("%d",&b[i]); } for(i=0;i<M;i++){ c+=b[i]; if(c>=N){ printf("%d\n",i+1); break; ...
main.c: In function 'main': main.c:24:25: error: implicit declaration of function 'f' [-Wimplicit-function-declaration] 24 | f(c>=N){ | ^ main.c:24:32: error: expected ';' before '{' token 24 | f(c>=N){ | ...
s287767174
p00467
C
#include<stdio.h> int main(void){ int n,m,i,sum=0,ans=0; int masu[1000]={0},sai[1000]; (scanf("%d %d",&n,&m) if(n==0) break; for(i=0;i<n;i++){ scanf("%d",&masu[i]); } for(i=0;i<m;i++){ scanf("%d",&sai[i]); } for(i=0;i<m;i++){ if(sum+1>=n) break; sum+=sai[i]; sum+=masu[sum]; ans++; } printf("%d\...
main.c: In function 'main': main.c:6:30: error: expected ')' before 'if' 6 | (scanf("%d %d",&n,&m) | ~ ^ | ) 7 | if(n==0) break; | ~~ main.c:23:18: error: expected ';' before '}' token 23 | ...
s414246111
p00467
C
#include <stdio.h> int main(void) { int m, n; int masu[2000]; int now; int dice; int i; while (1) { now = 1; flag = 1; scanf("%d %d", &n, &m); if (!n) break; for (i = 1; i <= n; i++) { scanf("%d", &masu[i]); } for (i = 1; now <= n; i++) { scanf("%d", &dice); now += dice; now += ...
main.c: In function 'main': main.c:13:17: error: 'flag' undeclared (first use in this function) 13 | flag = 1; | ^~~~ main.c:13:17: note: each undeclared identifier is reported only once for each function it appears in
s846747977
p00467
C
#include <stdio.h> int main() { int i1, N, M, *n, *m, sw = 0, s = 0, ct = 0; scanf("%d %d", &N, &M); n = new int [N]; m = new int [M]; for (i1 = 0; i1 < N; i1++) scanf("%d", &n[i1]); for (i1 = 0; i1 < M; i1++) scanf("%d", &m[i1]); while (sw == 0) { s += m[ct]; ct++; if (s >= N-1) sw = 1; else { ...
main.c: In function 'main': main.c:6:13: error: 'new' undeclared (first use in this function) 6 | n = new int [N]; | ^~~ main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in main.c:6:16: error: expected ';' before 'int' 6 | n = new...