submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s618556384
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int i,v,j; for(i=1;i<N;i++){ v=A[i]; j=i-1; while(j>=0&&A[j]>v){ A[j+1] = A[j]; j--; } A[j+1]=v; for(j=0;j<N;j++){ printf("%d ",A[j]); } printf("\n"); } }...
main.c: In function 'main': main.c:26:13: error: 'j' undeclared (first use in this function) 26 | for(i=0;j<N;j++){ | ^ main.c:26:13: note: each undeclared identifier is reported only once for each function it appears in
s998525764
p02255
C
00:00 sec 2076 KB 486 bytes ? 1 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 29 30 31 32 33 34 35 #include<stdio.h> int main(void){ int n; int v,j=0,i=0,k=0; scanf("%d",&n); int A[n]; for(i=0;i<n;i++){ scanf("%d",&A[i]); } for(i=0;i<n;i++){ v=A[i]; j=i...
main.c:2:1: error: expected identifier or '(' before numeric constant 2 | 00:00 sec 2076 KB 486 bytes | ^~ In file included from /usr/include/stdio.h:47, from main.c:40: /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t' 28 | ...
s409436871
p02255
C
#include<stdio.h> insertionSort(A[],N){ int v,j; for(i=1;i<N;i++){ v = A[i]; j = i-1; while((j >= 0) && (A[j] > v)){ A[j+1] = A[j]; j--; A[j+1] = v; } for(j=0;j<N;j++){ printf("%d",A[i]); ...
main.c:4:15: error: unknown type name 'A' 4 | insertionSort(A[],N){ | ^ main.c:4:19: error: unknown type name 'N' 4 | insertionSort(A[],N){ | ^ main.c: In function 'main': main.c:31:9: error: 'i' undeclared (first use in this function) 31 | for(i=0;i<N;i++){ ...
s306486478
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int v,j; for(i=1;i<N;i++){ v = A[i]; j = i-1; while((j >= 0) && (A[j] > v)){ A[j+1] = A[j]; j--; A[j+1] = v; } for(j=0;j<N;j++){ printf("...
main.c: In function 'insertionSort': main.c:7:9: error: 'i' undeclared (first use in this function) 7 | for(i=1;i<N;i++){ | ^ main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:31:9: error: 'i' undeclared (first use...
s179103868
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int i,v,j; for(i=1;i<N;i++){ v = A[i]; j = i-1; while((j >= 0) && (A[j] > v)){ A[j+1] = A[j]; j--; A[j+1] = v; } for(j=0;j<N;j++){ printf...
main.c: In function 'main': main.c:31:9: error: 'i' undeclared (first use in this function) 31 | for(i=0;i<N;i++){ | ^ main.c:31:9: note: each undeclared identifier is reported only once for each function it appears in
s705178189
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int i,v,j; for(i=1;i<N;i++){ v = A[i]; j = i-1; while((j >= 0) && (A[j] > v)){ A[j+1] = A[j]; j--; A[j+1] = v; } for(j=0;j<N;j++){ printf...
main.c: In function 'main': main.c:36:15: error: 'n' undeclared (first use in this function) 36 | for(i=0;i<n;i++){ | ^ main.c:36:15: note: each undeclared identifier is reported only once for each function it appears in main.c:38:12: error: 'j' undeclared (first use in this function) 38 |...
s102839223
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int i,v,j; for(i=1;i<N;i++){ v = A[i]; j = i-1; while((j >= 0) && (A[j] > v)){ A[j+1] = A[j]; j--; A[j+1] = v; } for(j=0;j<N;j++){ printf...
main.c: In function 'main': main.c:38:12: error: 'j' undeclared (first use in this function) 38 | if(j != N-1) printf(" "); | ^ main.c:38:12: note: each undeclared identifier is reported only once for each function it appears in
s896060777
p02255
C
#include<stdio.h> void insertionSort(int A[],int N){ int i,j,v; for(i=1;i<N;i++){ v=A[i]; j=i-1; while(j>=0&&A[j]>v){ A[j+1]=A[j]; j--; } A[j+1]=v; for(i=0;i<N;i++){ printf("%d",A[i]); if(i!=N-1) printf(" "); ...
main.c: In function 'main': main.c:28:9: error: 'i' undeclared (first use in this function) 28 | for(i=0;i<N;i++){ | ^ main.c:28:9: note: each undeclared identifier is reported only once for each function it appears in
s605016846
p02255
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s270077460
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } int main(){ int n, i, j; int A[N+1]; scanf("%d", &n); for ( i = 1; i <= n; i++ ) scanf("%d", &A[i]); trace(A, n); ...
main.c: In function 'main': main.c:23:2: error: expected ';' before 'for' 23 | 2 for(i=0;i<N-1;i++){ | ^ ~~~ | ;
s679431231
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } int main(){ int n, i, j; int A[N+1]; scanf("%d", &n); for ( i = 1; i <= n; i++ ) scanf("%d", &A[i]); trace(A, n); ...
main.c: In function 'main': main.c:23:2: error: expected ';' before 'for' 23 | 2 for(i=0;i<N-1;i++){ | ^ ~~~ | ;
s071739601
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int A[], in...
main.c: In function 'sort': main.c:25:30: error: 'a' undeclared (first use in this function) 25 | while((j=0)&&(A[j-1]>a[j])){ | ^ main.c:25:30: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:43:3: e...
s109662798
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int A[], in...
main.c: In function 'sort': main.c:25:30: error: 'a' undeclared (first use in this function) 25 | while((j=0)&&(A[j-1]>a[j])){ | ^ main.c:25:30: note: each undeclared identifier is reported only once for each function it appears in
s961860952
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int A[], in...
main.c: In function 'sort': main.c:25:30: error: 'a' undeclared (first use in this function) 25 | while((j>0)&&(A[j-1]>a[j])){ | ^ main.c:25:30: note: each undeclared identifier is reported only once for each function it appears in
s751803305
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int Ak, int...
main.c: In function 'sort': main.c:25:23: error: 'k' undeclared (first use in this function) 25 | while((j>0)&&(k[j-1]>a[j])){ | ^ main.c:25:23: note: each undeclared identifier is reported only once for each function it appears in main.c:25:30: error: 'a' undeclared (first use in...
s424553537
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int Ak, int...
main.c: In function 'sort': main.c:25:23: error: 'k' undeclared (first use in this function) 25 | while((j>0)&&(k[j-1]>a[j])){ | ^ main.c:25:23: note: each undeclared identifier is reported only once for each function it appears in main.c:25:30: error: 'a' undeclared (first use in...
s935514115
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int Ak, int...
main.c: In function 'sort': main.c:25:23: error: 'k' undeclared (first use in this function) 25 | while((j>0)&&(k[j-1]>a[j])){ | ^ main.c:25:23: note: each undeclared identifier is reported only once for each function it appears in main.c:25:30: error: 'a' undeclared (first use in...
s641856831
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int Ak, int...
main.c: In function 'sort': main.c:25:23: error: 'k' undeclared (first use in this function) 25 | while((j>0)&&(k[j-1]>a[j])){ | ^ main.c:25:23: note: each undeclared identifier is reported only once for each function it appears in main.c:25:30: error: 'a' undeclared (first use in...
s964844392
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int Ak, int...
main.c: In function 'sort': main.c:25:23: error: 'k' undeclared (first use in this function) 25 | while((j>0)&&(k[j-1]>k[j])){ | ^ main.c:25:23: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:41:8: error: p...
s978383971
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int k, int ...
main.c: In function 'sort': main.c:25:24: error: subscripted value is neither array nor pointer nor vector 25 | while((j>0)&&(k[j-1]>k[j])){ | ^ main.c:25:31: error: subscripted value is neither array nor pointer nor vector 25 | while((j>0)&&(k[j-1]>k[j])){ | ...
s809190070
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void swap(int *p_from, int *p_to){ int tmp; tmp = *p_from; *p_from = *p_to; *p_to = tmp; } void sort(int k[], in...
main.c: In function 'main': main.c:42:3: error: implicit declaration of function 'trance'; did you mean 'trace'? [-Wimplicit-function-declaration] 42 | trance(A,n) | ^~~~~~ | trace main.c:42:14: error: expected ';' before 'return' 42 | trance(A,n) | ^ | ; ...
s206615935
p02255
C
#include<stdio.h> #define M 100 int N A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ intj,i,val; for(i=1;i<N;i++){ val = A[i] j=i-1; while(j>=0&&A[j]>val)...
main.c:4:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'A' 4 | int N A[M]; | ^ main.c: In function 'print': main.c:8:15: error: 'N' undeclared (first use in this function) 8 | for(i=0;i<N;i++){ | ^ main.c:8:15: note: each undeclared identifier is reported ...
s896523770
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ intj,i,val; for(i=1;i<N;i++){ val = A[i] j=i-1; while(j>=0&&A[j]>val)...
main.c: In function 'sort': main.c:16:9: error: 'intj' undeclared (first use in this function); did you mean 'int'? 16 | intj,i,val; | ^~~~ | int main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in main.c:16:16: error: 'val' undeclar...
s820866035
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ intj,i,val; for(i=1;i<N;i++){ val = A[i] j=i-1; while(j>=0&&A[j]>val)...
main.c: In function 'sort': main.c:16:9: error: 'intj' undeclared (first use in this function); did you mean 'int'? 16 | intj,i,val; | ^~~~ | int main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in main.c:16:16: error: 'val' undeclar...
s020157591
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ intj,i,val; for(i=1;i<N;i++){ val = A[i]; j=i-1; while(j>=0&&A[j]>val...
main.c: In function 'sort': main.c:16:9: error: 'intj' undeclared (first use in this function); did you mean 'int'? 16 | intj,i,val; | ^~~~ | int main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in main.c:16:16: error: 'val' undeclar...
s334224260
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ int j,i,val; for(i=1;i<N;i++){ val = A[i]; j=i-1; while(j>=0&&A[j]>va...
main.c: In function 'sort': main.c:25:13: error: too few arguments to function 'printf' 25 | printf(); | ^~~~~~ In file included from main.c:1: /usr/include/stdio.h:363:12: note: declared here 363 | extern int printf (const char *__restrict __format, ...); | ^~~~~~
s345476742
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ int j,i,val; for(i=1;i<N;i++){ val = A[i]; j=i-1; while(j>=0&&A[j]>va...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s982241293
p02255
C
#include<stdio.h> #define M 100 int N,A[M]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ int j,i,val; for(i=1;i<N;i++){ val = A[i]; j=i-1; while(j>=0&&A[j]>va...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s140354502
p02255
C
#include<stdio.h> #define MAX 100 int N,A[MAX]; void print(){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); void sort(){ int j,i,val; for(i=1;i<N;i++){ val = A[i]; j=i-1; while(j>=0&&A[j...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s469822773
p02255
C
#include<stdio.h> #define MAX 100 int N,A[MAX]; void print(){ int i; for(i=0;i<N;i++){ if(i>0) printf(" "); print("%d",A[i]); } prinft("\n"); } void sort(){ int j,i,val; for(i=1;i<N;i++){ val=A[i]; j=i-1; while(j>=0&&A[j]>val){ A[j+1]=A[j]; ...
main.c: In function 'print': main.c:12:5: error: implicit declaration of function 'prinft'; did you mean 'print'? [-Wimplicit-function-declaration] 12 | prinft("\n"); | ^~~~~~ | print
s558519532
p02255
C
#include<stdio.h> #include<stdlib.h> void scanArrayInt(int N, int* A){ int i; for(i = 0; i < N; i++){ scanf("%d", &A[i]); } } void printArray(int N, int* A){ int i; for(i = 0; i < N - 1; i++){ printf("%d ", A[i]); } printf("%d", A[N - 1]); } void insertionSort(int N, int* ...
main.c: In function 'main': main.c:45:17: error: expected ';' before 'return' 45 | printf("\n") | ^ | ; 46 | return 0; | ~~~~~~
s992290173
p02255
C
#include<stdio.h> #include<stdlib.h> void scanArrayInt(int N, int* A){ int i; for(i = 0; i < N; i++){ scanf("%d", &A[i]); } } void printArray(int N, int* A){ int i; for(i = 0; i < N - 1; i++){ printf("%d ", A[i]); } printf("%d\n", A[N - 1]); } void insertionSort(int N, int...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s317516694
p02255
C
#include<iostream> using namespace std; int main(void){ int A[100]; int N,t,j; cin>>N; for(int i=0;i<N;i++) cin>>A[i]; for(int i=1;i<N;i++){ for(int k=0;k<N;k++)cout<<A[k]; cout<<endl; t=A[i]; j=i-1; while(j>=0&&A[j]>t){ A[j+1]=A[j]; j--; A[j+1]=t; } } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s110301379
p02255
C
#include<iostream> using namespace std; int main(void){ int A[100]; int N,t,j; cin>>N; for(int i=0;i<N;i++) cin>>A[i]; for(int i=1;i<N;i++){ for(int k=0;k<N;k++)cout<<A[k]<<" "; cout<<endl; t=A[i]; j=i-1; while(j>=0&&A[j]>t){ A[j+1]=A[j]; j--; A[j+1]=t; } } return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s325741760
p02255
C
#include<iostream> using namespace std; int main(void){ int A[100]; int N,t,j; cin>>N; for(int i=0;i<N;i++) cin>>A[i]; for(int i=1;i<N;i++){ for(int k=0;k<N;k++)cout<<A[k]<<" "; cout<<endl; t=A[i]; j=i-1; while(j>=0&&A[j]>t){ A[j+1]=A[j]; j--; A[j+1]=t; } } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s113297088
p02255
C
#include <stdio.h> void trace(int,int); void insertionSort(int,int); int main(void){ int N, i; int A[100]; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&A[i]); trace(A,N); insertionSort(A,N); return 0; } void trace(int A[],int N) { int i; for(i=0;i<N;i++) { if(i>0) printf(" "); printf("%d",A[i]); } p...
main.c: In function 'main': main.c:12:15: error: passing argument 1 of 'trace' makes integer from pointer without a cast [-Wint-conversion] 12 | trace(A,N); | ^ | | | int * main.c:3:12: note: expected 'int' but argument is of type 'int *' 3 | vo...
s955910627
p02255
C
#include<stdio.h> /*配列の要素を順番に出力*/ void trace(int A[], int N) {  int i; for (i = 0; i < N; i++) { if (i > 0 ) printf(""); printf("%d", A[i]); } printf("\n"); } /*挿入ソート 0オリジン配列*/ void insertionSort(int A[], int N) { int j, i, v; for ( i = 1; i < N; i++ ) { v = A[i]; j = i - 1; while ( j...
main.c: In function 'trace': main.c:5:1: error: stray '\343' in program 5 | <U+3000>int i; | ^~~~~~~~
s879151847
p02255
C
#include<stdio.h> /*配列の要素を順番に出力*/ void trace(int A[], int N) {  int i; for (i = 0; i < N; i++) { if (i > 0 ) printf(" "); printf("%d", A[i]); } printf("\n"); } /*挿入ソート 0オリジン配列*/ void insertionSort(int A[], int N) { int j, i, v; for ( i = 1; i < N; i++ ) { v = A[i]; j = i - 1; while ( ...
main.c: In function 'trace': main.c:5:1: error: stray '\343' in program 5 | <U+3000>int i; | ^~~~~~~~
s057294976
p02255
C
#include<stdio.h> /*配列の要素を順番に出力*/ void trace(int A[], int N) {  int i; for (i = 0; i < N; i++) { if (i > 0 ) printf(" "); printf("%d", A[i]); } printf("\n"); } /*挿入ソート 0オリジン配列*/ void insertionSort(int A[], int N) { int j, i, v; for ( i = 1; i < N; i++ ) { v = A[i]; j = i - 1; while ( ...
main.c: In function 'trace': main.c:5:1: error: stray '\343' in program 5 | <U+3000>int i; | ^~~~~~~~
s334508703
p02255
C
#include<stdio.h> /*配列の要素を順番に出力*/ void supertrace(int A[],int N){ int i; for(i=0;i<N;i++){ if(i>0)printf(" "); printf("%d",A[i]); } printf("\n"); } /*挿入ソート(0オリジン配列)*/ void insertionSort(int A[],int N){ int j,i,v; for(i=1;i<N;i++){ v=A[i]; j=i-1; while(j>...
main.c: In function 'main': main.c:43:5: error: expected declaration or statement at end of input 43 | return 0; | ^~~~~~
s886131609
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void sort(int *A, int i, int n) { int min; min=A[i]; for (i; i<n; i++) { if (A[i]<min) { tmp=min...
main.c: In function 'sort': main.c:19:14: error: 'tmp' undeclared (first use in this function) 19 | tmp=min; | ^~~ main.c:19:14: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:34:11: error: expected expression ...
s926735417
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void sort(int *A, int i, int n) { int min, tmp; min=A[i]; for (i; i<n; i++) { if (A[i]<min) { tm...
main.c: In function 'main': main.c:34:11: error: expected expression before ']' token 34 | trace(A[], n); | ^ main.c:35:32: error: 'I' undeclared (first use in this function) 35 | for (i=1; i<=n; i++) sort(A, I, n), trace(A[], n); | ^ main.c:35:32: note: ea...
s169649953
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void sort(int *A, int i, int n) { int min, tmp; min=A[i]; for (i; i<n; i++) { if (A[i]<min) { tm...
main.c: In function 'main': main.c:34:11: error: expected expression before ']' token 34 | trace(A[], n); | ^ main.c:35:47: error: expected expression before ']' token 35 | for (i=1; i<=n; i++) sort(A, i, n), trace(A[], n); | ^
s753317821
p02255
C
#include<stdio.h> static const int N = 1000; void trace(int A[], int n){ int i; for ( i = 1; i <= n; i++ ){ if ( i > 1 ) printf(" "); printf("%d", A[i]); } printf("\n"); } void sort(int *A, int i, int n) { int min, tmp, j; j=i; min=A[i]; for (i; i<n; i++) { if (A[i]<min) { ...
main.c: In function 'main': main.c:34:11: error: expected expression before ']' token 34 | trace(A[], n); | ^ main.c:35:47: error: expected expression before ']' token 35 | for (i=1; i<=n; i++) sort(A, i, n), trace(A[], n); | ^
s224249979
p02255
C
#include<stdio.h> void trace(int A[], int N) { int i; for (i = 0; i < N; i++){ if( i > 0 )printf(" ") printf("%d" , A[i]); } printf("\n"); } void insertionSort(int A[], int N) { int j,i,v; for (i=1; i < N; i++){ v = A[i] j = i - 1; while ( j >= 0 && A[j] > v){ A[j + 1] = A[j]; j--; } A[j + 1]...
main.c: In function 'trace': main.c:5:39: error: expected ';' before 'printf' 5 | if( i > 0 )printf(" ") | ^ | ; 6 | printf("%d" , A[i]); | ~~~~~~ main.c...
s217150275
p02255
C
#include<stdio.h> void trace(int A[], int N) { int i; for (i = 0; i < N; i++){ if( i > 0 )printf(" "); printf("%d" , A[i]); } printf("\n"); } void insertionSort(int A[], int N) { int j,i,v; for (i=1; i < N; i++){ v = A[i] j = i - 1; while ( j >= 0 && A[j] > v){ A[j + 1] = A[j]; j--; } A[j + ...
main.c: In function 'insertionSort': main.c:15:25: error: expected ';' before 'j' 15 | v = A[i] | ^ | ; 16 | j = i - 1; | ~
s371918296
p02255
C
#include<stdio.h> void trace(int A[], int N) { int i; for (i = 0; i < N; i++){ if( i > 0 )printf(" "); printf("%d" , A[i]); } printf("\n"); } void insertionSort(int A[], int N) { int j,i,v; for (i=1; i < N; i++){ v = A[i] j = i - 1; while ( j >= 0 && A[j] > v){ A[j + 1] = A[j]; j--; } A[j + 1...
main.c: In function 'insertionSort': main.c:14:25: error: expected ';' before 'j' 14 | v = A[i] | ^ | ; 15 | j = i - 1; | ~
s077316844
p02255
C
#include<stdio.h> void trace(int A[], int N) { int i; for (i = 0; i < N; i++){ if( i > 0 )printf(" "); printf("%d" , A[i]); } printf("\n"); } void insertionSort(int A[], int N) { int j,i,v; for (i=1; i < N; i++){ v = A[i] j = i - 1; while ( j >= 0 && A[j] > v){ A[j + 1] = A[j]; j--; } A[j + 1...
main.c: In function 'insertionSort': main.c:14:25: error: expected ';' before 'j' 14 | v = A[i] | ^ | ; 15 | j = i - 1; | ~
s519882064
p02255
C
#include <iostream> #include <vector> using namespace std; void insertionSort(vector<int> vec) { for (int i = 1; i < vec.size(); ++i) { int v = vec[i]; int j = i - 1; while (j >= 0 && vec[j] > v) { vec[j + 1] = vec[j]; --j; } vec[j + 1] = v; for (int j = 0; j < vec.size() - 1; ++j) { cout <...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s049974224
p02255
C
#include<stdio.h> main(int argc, char *argv[])){ int i,j,key,N; N = (int)argv[1]; int a[N]; for(i=0;i<N;i++){ a[i]=(int)argv[N+1+i]; } for(j=1;i<N;i++){ key = a[j]; i=j-1; while(i>0 && a[i]<key){ a[i+1]=a[i]; i=i-1; } fo...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(int argc, char *argv[])){ | ^~~~ main.c: In function 'main': main.c:2:29: error: expected declaration specifiers before ')' token 2 | main(int argc, char *argv[])){ | ^ main.c:29: error: expected '...
s398378209
p02255
C
A[6]={5,2,4,6,1,3} for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:3:1: error: expected ',' or ';' before 'for' 3 | for i=1 to A.length-1 | ^~~
s613719737
p02255
C
A[6]={5,2,4,6,1,3} for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:3:1: error: expected ',' or ';' before 'for' 3 | for i = 1 to A.length-1 | ^~~
s745129092
p02255
C
A[6]={5,2,4,6,1,3}; for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:3:1: error: expected identifier or '(' before 'for' 3 | for i = 1 to A.length-1 | ^~~
s750276328
p02255
C
A[6]=(5,2,4,6,1,3) for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]=(5,2,4,6,1,3) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:1:6: error: invalid initializer 1 | A[6]=(5,2,4,6,1,3) | ^ main.c:3:1: error: expected ',' or ';' before 'for' ...
s737717412
p02255
C
A[6]={5,2,4,6,1,3} for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:3:1: error: expected ',' or ';' before 'for' 3 | for i = 1 to A.length-1 | ^~~
s016740896
p02255
C
A[6]={5,2,4,6,1,3} for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected ',' or ';' before 'for' 2 | for i = 1 to A.length-1 | ^~~
s899670221
p02255
C
A[6]={5,2,4,6,1,3}; for i = 1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected identifier or '(' before 'for' 2 | for i = 1 to A.length-1 | ^~~
s961507266
p02255
C
A[6]={5,2,4,6,1,3}; for (i = 1 ;A.length-1;) key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected identifier or '(' before 'for' 2 | for (i = 1 ;A.length-1;) | ^~~ main.c:2:14: error: expected '=...
s412103131
p02255
C
A[6]={5,2,4,6,1,3}; for (i = 1 ;i<A.length-1;) key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected identifier or '(' before 'for' 2 | for (i = 1 ;i<A.length-1;) | ^~~ main.c:2:14: error: expected ...
s676797060
p02255
C
A[6]={5,2,4,6,1,3} for (i = 1 ;i<A.length-1;) key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected ',' or ';' before 'for' 2 | for (i = 1 ;i<A.length-1;) | ^~~ main.c:2:14: error: expected '=', ','...
s640226559
p02255
C
1 #include<stdio.h> 2 main(){ 3 int i,j,key,N; 4 5 scanf("%d ",&N); 6 int a[N]; 7 ...
main.c:2:3: error: expected identifier or '(' before numeric constant 2 | 1 #include<stdio.h> | ^ main.c:2:5: error: stray '#' in program 2 | 1 #include<stdio.h> | ^
s915587467
p02255
C
A[6]={5,2,4,6,1,3} for (i = 1 ;i<A.length-1;j--) key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected ',' or ';' before 'for' 2 | for (i = 1 ;i<A.length-1;j--) | ^~~ main.c:2:14: error: expected '=', ...
s586727905
p02255
C
A[6]={5,2,4,6,1,3}; for (i = 1 ;i<A.length-1;j--) key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected identifier or '(' before 'for' 2 | for (i = 1 ;i<A.length-1;j--) | ^~~ main.c:2:14: error: expect...
s562206655
p02255
C
#include<stdio.h> int main() { int A={3,5,1,4,8,7,2,9}; int i,j,v; int A[]; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a); A[i]=a; } for(i=1;i<N-1;i++) { v = A[i]; j=i-1; while(j>=0) { if(A[j]>v) { A[j+1] = A[j]; j--; A[j+1]=v; } } ...
main.c: In function 'main': main.c:5:10: warning: excess elements in scalar initializer 5 | int A={3,5,1,4,8,7,2,9}; | ^ main.c:5:10: note: (near initialization for 'A') main.c:5:12: warning: excess elements in scalar initializer 5 | int A={3,5,1,4,8,7,2,9}; | ^ main.c:5:12: note...
s971776623
p02255
C
#include<stdio.h> int main() { int i,j,v; int A[]; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a); A[i]=a; } for(i=1;i<N-1;i++) { v = A[i]; j=i-1; while(j>=0) { if(A[j]>v) { A[j+1] = A[j]; j--; A[j+1]=v; } } } for(i=0;i<N;i++) { ...
main.c: In function 'main': main.c:6:5: error: array size missing in 'A' 6 | int A[]; | ^ main.c:8:13: error: 'N' undeclared (first use in this function) 8 | scanf("%d",&N); | ^ main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in main.c...
s010249809
p02255
C
#include<stdio.h> int main() { int i,j,v,N; int A[]; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a); A[i]=a; } for(i=1;i<N-1;i++) { v = A[i]; j=i-1; while(j>=0) { if(A[j]>v) { A[j+1] = A[j]; j--; A[j+1]=v; } } } for(i=0;i<N;i++) { ...
main.c: In function 'main': main.c:6:5: error: array size missing in 'A' 6 | int A[]; | ^ main.c:10:17: error: 'a' undeclared (first use in this function) 10 | scanf("%d",&a); | ^ main.c:10:17: note: each undeclared identifier is reported only once for each function it appears...
s189632257
p02255
C
#include<stdio.h> int main() { int i,j,v,N,a; int A[]; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a); A[i]=a; } for(i=1;i<N-1;i++) { v = A[i]; j=i-1; while(j>=0) { if(A[j]>v) { A[j+1] = A[j]; j--; A[j+1]=v; } } } for(i=0;i<N;i++) {...
main.c: In function 'main': main.c:6:5: error: array size missing in 'A' 6 | int A[]; | ^
s453079927
p02255
C
#include<stdio.h> #define N 100 int main() { int i,j,v,N,a; int A[N]; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a); A[i]=a; } for(i=1;i<N-1;i++) { v = A[i]; j=i-1; while(j>=0) { if(A[j]>v) { A[j+1] = A[j]; j--; A[j+1]=v; } } } for(...
main.c: In function 'main': main.c:2:11: error: expected identifier or '(' before numeric constant 2 | #define N 100 | ^~~ main.c:5:11: note: in expansion of macro 'N' 5 | int i,j,v,N,a; | ^ main.c:8:12: error: lvalue required as unary '&' operand 8 | scanf("%d",&N); | ...
s565765913
p02255
C
1 insertionSort(A, N) // N個の要素を含む0-オリジンの配列A 2 for i が 1 から N-1 まで 3 v = A[i] 4 j = i - 1 5 while j >= 0 かつ A[j] <v 6 A[j+1] = A[j] 7 j-- 8 A[j+1] = v
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 1 insertionSort(A, N) // N個の要素を含む0-オリジンの配列A | ^
s701561898
p02255
C
A[6]={5,2,4,6,1,3}; for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i]
main.c:1:1: warning: data definition has no type or storage class 1 | A[6]={5,2,4,6,1,3}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int] main.c:2:1: error: expected identifier or '(' before 'for' 2 | for i=1 to A.length-1 | ^~~
s282685548
p02255
C
#include <stdio.h>A[6]={5,2,4,6,1,3} int main (int argc,char argv[]) { for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i] }
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>A[6]={5,2,4,6,1,3} | ^ main.c: In function 'main': main.c:4:5: error: expected '(' before 'i' 4 | for i=1 to A.length-1 | ^ | ( main.c:4:5: error: 'i' undeclared (first use in this f...
s997292987
p02255
C
#include<stdio.h> int main(){ int a,b; int i=0, j; int s[1000]; scanf("%d",&a); while(scanf("%d",&s[i]) != EOF)i++; for(i = 1;i < a-1;i++){ b = s[i]; j = i - 1; while(j>= 0 || s[j] > b){ s[j+1] = s[j]; j--; a[j+1]=b; } for(i = 0;i ...
main.c: In function 'main': main.c:15:10: error: subscripted value is neither array nor pointer nor vector 15 | a[j+1]=b; | ^
s387293342
p02255
C
#include <stdio.h> int main(argc,char argv[]) { [6]={5,2,4,6,1,3} for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i] }
main.c:2:15: error: expected ')' before 'char' 2 | int main(argc,char argv[]) | ^~~~ | )
s277022906
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { [6]={5,2,4,6,1,3} for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i] }
main.c: In function 'main': main.c:4:5: error: expected expression before '[' token 4 | [6]={5,2,4,6,1,3} | ^
s006780676
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { [6]={5,2,4,6,1,3} for i=1 to A.length-1 key=A[i] j=i-1 while j>=0 and A[j]>key A[j+1]=A[j] j-- A[j+1]=key //for a=0 to //printf a[i] return 0; }
main.c: In function 'main': main.c:4:5: error: expected expression before '[' token 4 | [6]={5,2,4,6,1,3} | ^
s699837693
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { [6]={5,2,4,6,1,3}; for (i=1 ;i<A.length-1;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j] } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:4:5: error: expected expression before '[' token 4 | [6]={5,2,4,6,1,3}; | ^ main.c:5:10: error: 'i' undeclared (first use in this function) 5 | for (i=1 ;i<A.length-1;j--){ | ^ main.c:5:10: note: each undeclared identifier is reported only once...
s378032631
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { A[6]={5,2,4,6,1,3}; for (i=1 ;i<A.length-1;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j] } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:4:4: error: 'A' undeclared (first use in this function) 4 | A[6]={5,2,4,6,1,3}; | ^ main.c:4:4: note: each undeclared identifier is reported only once for each function it appears in main.c:4:9: error: expected expression before '{' token 4 | A[6]={5,2,4,6,1,3};...
s578354628
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j; for (i=1 ;i<A.length-1;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j] } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:6:10: error: 'i' undeclared (first use in this function) 6 | for (i=1 ;i<A.length-1;j--){ | ^ main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in main.c:6:18: error: request for member 'length' in something not a s...
s111875758
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j; for (i=1 ;i<(A.length-1);j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j] } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:6:10: error: 'i' undeclared (first use in this function) 6 | for (i=1 ;i<(A.length-1);j--){ | ^ main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in main.c:6:19: error: request for member 'length' in something not a...
s153466273
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j; for (i=1 ;i<((A.length)-1);j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:6:10: error: 'i' undeclared (first use in this function) 6 | for (i=1 ;i<((A.length)-1);j--){ | ^ main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in main.c:6:20: error: request for member 'length' in something not...
s804286484
p02255
C
#include <stdio.h> #include N 100 #include A 1000 int main(){ int i,j,k,number; int a[A]; int key; scanf(%d,&number); for(i=0;i<number;i++){ scanf(%d,&a[i]); } for(j=1,j<=number-1;j++){ key = a[j]; i = j-1; while(i>0 && a[i] > key){ a[i+1] = a[i]; ...
main.c:2:10: error: #include expects "FILENAME" or <FILENAME> 2 | #include N 100 | ^ main.c:3:10: error: #include expects "FILENAME" or <FILENAME> 3 | #include A 1000 | ^ main.c: In function 'main': main.c:6:11: error: 'A' undeclared (first use in this function) 6 | int a[A...
s201077634
p02255
C
#include<stdio.h> int main(){ int a,b; int i=0, j,k; int s[1000]; scanf("%d",&a); while(scanf("%d",&s[i]) != EOF)i++; for(i = 1;i < a-1;i++){ b = s[i]; j = i - 1; while(j>= 0 || s[j] > b){ s[j+1] = s[j]; j--; s[j+1]=b; } for(k = 0;...
main.c: In function 'main': main.c:18:24: error: 'c' undeclared (first use in this function) 18 | printf("%d ",s[c]); | ^ main.c:18:24: note: each undeclared identifier is reported only once for each function it appears in
s649303290
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j,i; for (i=1 ;i<((A.length)-1);j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:6:20: error: request for member 'length' in something not a structure or union 6 | for (i=1 ;i<((A.length)-1);j--){ | ^ main.c:12:19: error: expected ';' before '}' token 12 | A[j+1]=key | ^ | ...
s072944239
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j,i; for (i=1 ;i<=6j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:6:20: error: lvalue required as decrement operand 6 | for (i=1 ;i<=6j--){ | ^~ main.c:6:22: error: expected ';' before ')' token 6 | for (i=1 ;i<=6j--){ | ^ | ; main.c:12:19: error: expected...
s594662149
p02255
C
#include <stdio.h> # N 100 # A 1000 int main(){ int i,j,k,number; int a[A]; int key; scanf(%d,&number); for(i=0;i<number;i++){ scanf(%d,&a[i]); } for(j=1,j<=number-1;j++){ key = a[j]; i = j-1; while(i>0 && a[i] > key){ a[i+1] = a[i]; i ...
main.c:2:3: error: invalid preprocessing directive #N 2 | # N 100 | ^ main.c:3:3: error: invalid preprocessing directive #A 3 | # A 1000 | ^ main.c: In function 'main': main.c:6:11: error: 'A' undeclared (first use in this function) 6 | int a[A]; | ^ main.c:6:11: note: ea...
s328744701
p02255
C
#include <stdio.h> int main(int argc,char argv[]) { int A[6]={5,2,4,6,1,3}; int key,j,i; for (i=1 ;i<=6;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:12:19: error: expected ';' before '}' token 12 | A[j+1]=key | ^ | ; ...... 15 | } | ~
s549583091
p02255
C
#include <stdio.h> int main(int argc,char *args[]) { int A[6]={5,2,4,6,1,3}; int key,j,i; for (i=1 ;i<=6;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:12:19: error: expected ';' before '}' token 12 | A[j+1]=key | ^ | ; ...... 15 | } | ~
s202671538
p02255
C
#include <stdio.h> #define N 100 #define A 1000 int main(){ int i,j,k,number; int a[A]; int key; scanf(%d,&number); for(i=0;i<number;i++){ scanf(%d,&a[i]); } for(j=1,j<=number-1;j++){ key = a[j]; i = j-1; while(i>0 && a[i] > key){ a[i+1] = a[i]; ...
main.c: In function 'main': main.c:8:11: error: expected expression before '%' token 8 | scanf(%d,&number); | ^ main.c:10:15: error: expected expression before '%' token 10 | scanf(%d,&a[i]); | ^ main.c:12:28: error: expected ';' before ')' token 12 | for(j=...
s658750045
p02255
C
#include <stdio.h> int main(int argc,char *args[]) { int A[6]={5,2,4,6,1,3}; int key,j,i; for (i=1 ;i<=6;j--){ key=A[i]; j=i-1; while (j>=0 &&A[j]>key){ A[j+1]=A[j]; } A[j+1]=key //for a=0 to //printf a[i] } return 0; }
main.c: In function 'main': main.c:12:19: error: expected ';' before '}' token 12 | A[j+1]=key | ^ | ; ...... 15 | } | ~
s563747377
p02255
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s924246739
p02255
C
#include <stdio.h> #define N 100 #define A 1000 int main(){ int i,j,k,number; int a[A]; int key; scanf("%d",&number); for(i=0;i<number;i++){ scanf("%d",&a[i]); } for(j=1,j<=number-1;j++){ key = a[j]; i = j-1; while(i>0 && a[i] > key){ a[i+1] = a[i]...
main.c: In function 'main': main.c:12:28: error: expected ';' before ')' token 12 | for(j=1,j<=number-1;j++){ | ^ | ; main.c:23:16: error: stray '\' in program 23 | printf(\n); | ^ main.c:23:17: error: 'n' undeclare...
s649506023
p02255
C
#include<stdio.h> int main(void){ int A[6]={5,2,4,6,1,3}; int i,j; int key; for(j = 0 ; j < sizeof(A) ; j ++){ key = A[j]; printf("%d",key); i = j-1; } while(i>0 && A[i]>key){ A[i+1] = A[i]; i = i-1; A[i+1] = key; ...
main.c:21:1: error: expected identifier or '(' before '}' token 21 | } | ^
s233217857
p02255
C
#include <stdio.h> #define N 100 #define A 1000 int main(){ int i,j,k,number; int a[A]; int key; scanf("%d",&number); for(i=0;i<number;i++){ scanf("%d",&a[i]); } for(j=1;j<=number-1;j++){ key = a[j]; i = j-1; while(i>0 && a[i] > key){ a[i+1] = a[i]...
main.c: In function 'main': main.c:23:16: error: stray '\' in program 23 | printf(\n); | ^ main.c:23:17: error: 'n' undeclared (first use in this function) 23 | printf(\n); | ^ main.c:23:17: note: each undeclared identifier is reported only once for each ...
s415746227
p02255
C
#include <stdio.h> int main(){ int i,j,v,N,n; int A[1000]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&A[i]) } for(i=1;i<=N-1;i++){ v=A[i]; j=i-1; while(j>=0 && A[j]>v){ A[j+1]=A[j]; j--; A[j+1]=v; } ...
main.c: In function 'main': main.c:10:26: error: expected ';' before '}' token 10 | scanf("%d",&A[i]) | ^ | ; 11 | } | ~
s035452899
p02255
C
#include <stdio.h> int main(){ int i,j,v,N,n; int A[1000]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&A[i]) } for(i=1;i<=N-1;i++){ v=A[i]; j=i-1; while(j>=0 && A[j]>v){ A[j+1]=A[j]; j--; A[j+1]=v; } ...
main.c: In function 'main': main.c:10:26: error: expected ';' before '}' token 10 | scanf("%d",&A[i]) | ^ | ; 11 | } | ~
s791233714
p02255
C
#include <stdio.h> int main(void) { int i,N,c,V,j,k; int In[100]; scanf("%d",&N); for(i=0 ; i<N ; i++){ scanf("%d",&In[i]); } for(i=0 ; i>N ; i++){ V=In[i]; j=i-1; while(j>=0 && In[j]>V){ In[j+1] = In[j] j-- In[j+1] = V ...
main.c: In function 'main': main.c:16:28: error: expected ';' before 'j' 16 | In[j+1] = In[j] | ^ | ; 17 | j-- | ~
s142986677
p02255
C
#include <stdio.h> int main(void) { int i,N,c,V,j,k; int In[100]; scanf("%d",&N); for(i=0 ; i<N ; i++){ scanf("%d",&In[i]); } for(i=0 ; i>N ; i++){ V=In[i]; j=i-1; while(j>=0 && In[j]>V){ In[j+1] = In[j] j-- In[j+1] = V ...
main.c: In function 'main': main.c:16:28: error: expected ';' before 'j' 16 | In[j+1] = In[j] | ^ | ; 17 | j-- | ~
s222499419
p02255
C
#include <stdio.h> int main(void){ int i,N,c,V,j,k; int In[100]; scanf("%d",&N); for(i=0 ; i<N ; i++){ scanf("%d",&In[i]); } for(i=0 ; i>N ; i++){ V=In[i]; j=i-1; while(j>=0 && In[j]>V){ In[j+1] = In[j] j-- In[j+1] = V ...
main.c: In function 'main': main.c:15:28: error: expected ';' before 'j' 15 | In[j+1] = In[j] | ^ | ; 16 | j-- | ~
s885126426
p02255
C
#include<stdio.h> main(){ int i,n,v,j,k; scanf("%d",&n); int A[n]; for(i=0;i<n;i++) { scanf("%d",&A[i]); } for(i=1;i<n;i++) { for(k=0;k<n;k++) { printf("%d",A[k]); if(k+1!=n){ printf(" "); } } printf("\n"); v=A[i]; ...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:43:21: error: expected ';' before '}' token 43 | printf("\n") | ^ | ; 44 | } | ~
s767376579
p02255
C
/home/student/s1250137/Algo/Ex01/ex1_A.c
main.c:1:1: error: expected identifier or '(' before '/' token 1 | /home/student/s1250137/Algo/Ex01/ex1_A.c | ^