submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s118872183
p00001
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class main { private static int top3[]; public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); top3 = new int[3]; for(int i=0;i<10;i++){ int h = Integ...
Main.java:5: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s381522557
p00001
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class AOJ_Volume0001 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] v...
Main.java:6: error: class AOJ_Volume0001 is public, should be declared in a file named AOJ_Volume0001.java public class AOJ_Volume0001 { ^ 1 error
s546230404
p00001
Java
import java.util.Scanner; public class AOJ0001{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n[]=new int[10]; int a=0;int b=0;int c=0; for(int i=0;i<10;i++){ n[i] = sc.nextInt(); if(a<n[i]){ b=a; a=n[i]; }else if(b<n[i]){ c=b; b=n[i]; }else if(c...
Main.java:2: error: class AOJ0001 is public, should be declared in a file named AOJ0001.java public class AOJ0001{ ^ 1 error
s541228662
p00001
Java
import java.util.*; import java.io.*; public class HillsOfTop3 { public static void main (String args[]) { //ArrayList ar = new ArrayList(); int[] mountain = new int[10]; try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0; i < 10; i++) { mounta...
Main.java:4: error: class HillsOfTop3 is public, should be declared in a file named HillsOfTop3.java public class HillsOfTop3 { ^ 1 error
s929369607
p00001
Java
public class Main{ public static void main(String[] args){ int max = 10, temp; int mountain[] = new mountain[max]; Scanner sc = new Scanner(System.in); for(int i = 0; i < max; i++) mountain[i] = sc.nextInt(); for(int i = 0; i < max; i++){ for(int j = max; j > i; j--){ if(mountain[j-1] > mountain[j]){ ...
Main.java:4: error: cannot find symbol int mountain[] = new mountain[max]; ^ symbol: class mountain location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbo...
s957698130
p00001
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ int max = 10, temp; int mountain[] = new int[max]; Scanner sc = new Scanner(System.in); for(int i = 0; i < max; i++) mountain[i] = sc.nextInt(); for(int i = 0; i < max; i++){ for(int j = max; j > i; j--){ if(mounta...
Main.java:13: error: cannot find symbol temp = mountaim[j-1]; ^ symbol: variable mountaim location: class Main 1 error
s802205017
p00001
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Ideone { public static void main(String[] args) { try (BufferedReader r = new BufferedReader(new InputStreamReader(System.in))) { String line; int[] top3 = new int[3]; while ((line = r.readLine()) != null) { int val = Intege...
Main.java:4: error: class Ideone is public, should be declared in a file named Ideone.java public class Ideone { ^ 1 error
s852141208
p00001
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Ideone { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); String line; int[] top3 = new int[3]; ...
Main.java:5: error: class Ideone is public, should be declared in a file named Ideone.java public class Ideone { ^ 1 error
s841499800
p00001
Java
class Main{ public static void main(String[] a){ int m; int n; int l; int o; int p; for(i=0;i<10;i++){ m = Math.max(a[i],a[i+1]); } System.out.println(m); for(i=0;i<10;i++){ n = Math.max(a[i],a[i+1]); } l = Math.min(m,n); System.out.println(l); for(i=0;i<10;i++){ o = Math.max(a[i],a[i+1]); } p ...
Main.java:8: error: cannot find symbol for(i=0;i<10;i++){ ^ symbol: variable i location: class Main Main.java:8: error: cannot find symbol for(i=0;i<10;i++){ ^ symbol: variable i location: class Main Main.java:8: error: cannot find symbol for(i=0;i<10;i++){ ^ symbol: varia...
s036356875
p00001
Java
class Main{ public static void main(String[] a){ int m; int n; int l; int o; int p; for(int i=0;i<10;i++){ m = Math.max(a[i],a[i+1]); } System.out.println(m); for(int i=0;i<10;i++){ n = Math.max(a[i],a[i+1]); } l = Math.min(m,n); System.out.println(l); for(int i=0;i<10;i++){ o = Math.max(a[i],a[i...
Main.java:9: error: no suitable method found for max(String,String) m = Math.max(a[i],a[i+1]); ^ method Math.max(int,int) is not applicable (argument mismatch; String cannot be converted to int) method Math.max(long,long) is not applicable (argument mismatch; String cannot be converted t...
s873237534
p00001
Java
import java.util.Scanner; public class ListofTop3Hills { public static void main(String[] a) { Scanner scan = new Scanner(System.in); int[] x=new int[10]; int temp; for(int i=0;i<x.length;i++){ x[i]=scan.nextInt(); } for(int i=0;i<x.length;i++){ for(int j=0;j<x.length;j++){ if(x[i]>x[j]){ temp...
Main.java:2: error: class ListofTop3Hills is public, should be declared in a file named ListofTop3Hills.java public class ListofTop3Hills { ^ 1 error
s745898514
p00001
Java
import java.util.Scanner; public class main { public static void main(String[] a) { Scanner scan = new Scanner(System.in); int[] x=new int[10]; int temp; for(int i=0;i<x.length;i++){ x[i]=scan.nextInt(); } for(int i=0;i<x.length;i++){ for(int j=0;j<x.length;j++){ if(x[i]>x[j]){ temp=x[i]...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s846733014
p00001
Java
import java.util.Scanner; public class main { /** * @param args */ public static void main(String[] a) { Scanner scan = new Scanner(System.in); int[] x=new int[10]; int temp; for(int i=0;i<x.length;i++){ x[i]=scan.nextInt(); } for(int i=0;i<x.length;i++){ for(int j=0;j<x.length;j++){ if(x[...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s513633372
p00001
Java
import java.util.Scanner; public class ListofTop3Hills { /** * @param args */ public static void main(String[] a) { Scanner scan = new Scanner(System.in); int[] x=new int[10]; int temp; for(int i=0;i<x.length;i++){ x[i]=scan.nextInt(); } for(int i=0;i<x.length;i++){ for(int j=0;j<x.length;j++)...
Main.java:4: error: class ListofTop3Hills is public, should be declared in a file named ListofTop3Hills.java public class ListofTop3Hills { ^ 1 error
s037188454
p00001
Java
public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int a = 0, b = 0, c = 0; for(int i = 0 ; i < 10; i++){ String str = br.readLine(); int input = Integer.parseInt(str); if(input > a){ c = b; ...
Main.java:3: error: cannot find symbol public static void main(String[] args) throws IOException{ ^ symbol: class IOException location: class Main Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ ...
s122337425
p00001
C
#include <stdio.h> int main() { int n, a, b, c, i; a = b = c = 0; for(i=0;i<10;i++) { scanf("%d", &n); if (n>=a) c =b, b = a, a = n; else if (n>=b) c = b, b = n; else (n>c) c = n; } printf("%d\n%d\n%d\n", a, b, c); return (0); }
main.c: In function 'main': main.c:13:27: error: expected ';' before 'c' 13 | else (n>c) | ^ | ; 14 | c = n; | ~
s561665293
p00001
C
#include<stdio.h> #include<conio.h> int main( ) { int a[11]; int i, j, temp, n=10 ; for(j=0; j<n; j++) scanf("%d",&a[j]); for(j=1;j<n;j++) { for(i=0; i < n - 1; i++) { if(a[i]>a[i+1]) { temp=a[i]; ...
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s543463442
p00001
C
#include <bits/stdc++.h> using namespace std; int main() { int arr[10]; for(int i=0; i<10; i++){ cin >> arr[i]; } int l = sizeof(arr)/sizeof(int); sort(arr,arr+10); printf("%d\n%d\n%d\n",arr[9],arr[8],arr[7]); }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s929029147
p00001
C
1819 2003 876 2840 1723 1673 3776 2848 1592 922
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 1819 | ^~~~
s330625075
p00001
C
#include<stdio.h> #include<stdlib.h> int compare_int(int a, int b) { if(a>b){ return -1; } else{ return 1; } } int main(){ int i; int height[10]; for(i=0;i<10;i++){ scanf("%d", height+i); } qsort(height, sizeof(int), compare_int); for(i=0;i<3;i++){ printf("%d\n", hei...
main.c: In function 'main': main.c:18:32: error: passing argument 3 of 'qsort' makes integer from pointer without a cast [-Wint-conversion] 18 | qsort(height, sizeof(int), compare_int); | ^~~~~~~~~~~ | | | ...
s622253511
p00001
C
#include<stdio.h> #include<stdlib.h> int compare_int(const void *a, const void *b) { return *(int*)b - *(int*)a; } int main(){ int i; int height[10]; for(i=0;i<10;i++){ scanf("%d", height+i); } qsort(height, sizeof(int), compare_int); for(i=0;i<3;i++){ printf("%d\n", hei...
main.c: In function 'main': main.c:17:32: error: passing argument 3 of 'qsort' makes integer from pointer without a cast [-Wint-conversion] 17 | qsort(height, sizeof(int), compare_int); | ^~~~~~~~~~~ | | | ...
s407365045
p00001
C
#include<iostream> void sort(int *); int main() { int a[10]; for(int i=0;i<10;i++) { scanf("%d",&a[i]); } sort(a); printf("%d\n%d\n%d\n",a[0],a[1],a[2]); } void sort(int *a) { int T; for(int i=0;i<10;i++){ for(int j=i;j<10;j++){ if(a[i]<a[j]){ T...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s653405964
p00001
C
#include <stdio.h> int main(void) { int m[10]; int max1 = 0, max2 = 0, max3 = 0; int i; for (i = 0; i < 10; i++){ scanf("%d", &m[i]); } for (i = 0; i < 10; i++){ if (max1 <= m[i]){ /*max1 = m[i]; max2 = max1;*/ max3 = max2; max2 = max1; max1 = m[i]; } else if (max2 <= m[10]){ max3 =...
main.c: In function 'main': main.c:32:1: error: expected declaration or statement at end of input 32 | } | ^
s043819066
p00001
C
#include <stdio.h> int main() { int mountainList[9]; int highestMount = 0; int secondMount = 0; int thirdMount = 0; int tempMount; for (int c=0; c<=9; c++) { scanf(%d, tempMount); mountainList[c] = tempMount; if (tempMount > highestMount ) { ...
main.c: In function 'main': main.c:11:18: error: expected expression before '%' token 11 | scanf(%d, tempMount); | ^
s314538763
p00001
C
/************* 山の高い順に3つを出力 *************/ #include "stdio.h" #define YAMASU 10 #define SHUTURYOKU 3 int main(void) { int n=0; // 入力 int i,j; // 繰り返し int tmp=0; // 入れ替え  int yama[YAMASU]={0}; // 山の...
main.c: In function 'main': main.c:16:9: error: stray '\343' in program 16 | <U+3000>int yama[YAMASU]={0}; | ^~~~~~~~ main.c:31:1: error: stray '\343' in program 31 | <U+3000><U+3000><U+3000>//<U+3000><U+4E26><U+3079><U+66FF><U+3048> | ^~~~~~~~ main.c:31:3: error: stray '\343' in progr...
s330884472
p00001
C
#include <stdio.h> #define FOR( a,b ) for( a=0;a<b;a++ ) int main(){int mnt[10];int i,j,buf;FOR( i,10 )scanf( "%d",mnt[i] );FOR( i,10 )FOR( i+1,10 )if( mnt[i] < mnt[j] ){ buf=mnt[i];mnt[i]=mnt[j];mnt[j]=buf; };FOR( i,3 )printf( "%d\n",mnt[i] ); return 0;}
main.c: In function 'main': main.c:2:26: error: lvalue required as left operand of assignment 2 | #define FOR( a,b ) for( a=0;a<b;a++ ) | ^ main.c:4:79: note: in expansion of macro 'FOR' 4 | int main(){int mnt[10];int i,j,buf;FOR( i,10 )scanf( "%d",mnt[i] );FOR( i,10 )FOR( i+1,10 ...
s790723894
p00001
C
#include <stdio.h> #define FOR( a,b ) for( a=0;a<b;a++ ) int main(){ int mnt[10]; int i,j,buf; FOR( i,10 )scanf( "%d",mnt[i] ); FOR( i,10 )FOR( i+1,10 ) if( mnt[i] < mnt[j] ){ buf=mnt[i];mnt[i]=mnt[j];mnt[j]=buf; }; FOR( i,3 )printf( "%d\n",mnt[i] ); return 0; }
main.c: In function 'main': main.c:2:26: error: lvalue required as left operand of assignment 2 | #define FOR( a,b ) for( a=0;a<b;a++ ) | ^ main.c:8:12: note: in expansion of macro 'FOR' 8 | FOR( i,10 )FOR( i+1,10 ) | ^~~ main.c:2:34: error: lvalue required as in...
s255628942
p00001
C
#include<cstdio> #include<algorithm> #include<iostream> using namespace std; int main() { int a[10]; int i,j,k,m,n; for(i=0;i<10;i++) { scanf("%d",&a[i]); } sort(a,a+10); printf("%d\n%d\n%d\n",a[9],a[8],a[7]); }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s453968239
p00001
C
#include<cstdio> #include<algorithm> #include<iostream> using namespace std; int main() { int a[10]; int i,j,k,m,n; for(i=0;i<10;i++) { scanf("%d",&a[i]); } sort(a,a+10); printf("%d\n%d\n%d\n",a[9],a[8],a[7]); return 0; }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s043923681
p00001
C
include <stdio.h> #include<string.h> #include <stdlib.h> #include <readline/readline.h> #include <readline/history.h> #define BUFSIZ 64 int main (int ac, char **av) { char *prompt = getenv("PS2"); char *line = NULL; int lineSize = 0; int index = 0; int history_no = 0; int mountains[10] = {0}; while (li...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s610354131
p00001
C
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <readline/readline.h> #include <readline/history.h> #define BUFSIZ 64 int main (int ac, char **av) { char *prompt = getenv("PS2"); char *line = NULL; int lineSize = 0; int index = 0; int history_no = 0; int mountains[10] = {0}; while...
main.c:4:10: fatal error: readline/readline.h: No such file or directory 4 | #include <readline/readline.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s967966846
p00001
C
#include<stdio.h> int main(){ int m[10]; int i,j,max=0,n; for(i=0;i<10;i++) scanf("%d"&m[i]); for(j=0;j<3;j++){ for(i=0;i<10;i++){ if(m[i]>=max){ max=m[i]; n=i } } printf("%d\n",max); max=0; m[n]=0; ...
main.c: In function 'main': main.c:7:19: error: invalid operands to binary & (have 'char *' and 'int') 7 | scanf("%d"&m[i]); | ~~~~^~~~~ | | | | | int | char * main.c:12:19: error: expected ';' before '}' token 12 | ...
s762898258
p00001
C
#include<stdio.h> int main(){ int m[10]; int i,j,max=0,n; for(i=0;i<10;i++) scanf("%d",&m[i]); for(j=0;j<3;j++){ for(i=0;i<10;i++){ if(m[i]>=max){ max=m[i]; n=i } } printf("%d\n",max); max=0; m[n]=0; ...
main.c: In function 'main': main.c:12:19: error: expected ';' before '}' token 12 | n=i | ^ | ; 13 | } | ~
s245546237
p00001
C
#include<stdio.h> int main(void) { int i; int low; int mid; int large; int height[10]; i=0; while(i++ < 10) { scanf("%d", height[i-1]); if(i==1) low = mid = large = height[0]; if(height[i-1] > hi) { hi = height[i-1]; mid = hi; } else if(height[i-1] > mid) { ...
main.c: In function 'main': main.c:16:22: error: 'hi' undeclared (first use in this function); did you mean 'i'? 16 | if(height[i-1] > hi) { | ^~ | i main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
s690243034
p00001
C
#include<stdio.h> int main(void) { int i; int low; int mid; int large; int height[10]; i=0; while(i++ < 10) { scanf("%d", &(height[i-1])); if(i==1) low = mid = large = height[0]; if(height[i-1] > hi) { hi = height[i-1]; mid = hi; } else if(height[i-1] > mid)...
main.c: In function 'main': main.c:16:22: error: 'hi' undeclared (first use in this function); did you mean 'i'? 16 | if(height[i-1] > hi) { | ^~ | i main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
s822445019
p00001
C
#include<stdio.h> int main(void) { int i; int low; int mid; int large; int height[10]; i=0; while(i++ < 10) { scanf("%d", &(height[i-1])); if(i==1) low = mid = large = height[0]; if(height[i-1] > hi) { large = height[i-1]; mid = large; } else if(height[i-1] ...
main.c: In function 'main': main.c:16:22: error: 'hi' undeclared (first use in this function); did you mean 'i'? 16 | if(height[i-1] > hi) { | ^~ | i main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
s339859852
p00001
C
#include <stdio.h> int main(void) { int large; int mid; int low; int input; int i; int height[10]; i = 0; while(i++ < 10) { scanf("%d", &(height[i-1])); if(i==1) low = mid = large = height[0]; if(height[i-1]>large) { large = height[i-1]; } else if(height[i-1]>mid) { ...
main.c: In function 'main': main.c:22:13: error: 'heigth' undeclared (first use in this function); did you mean 'height'? 22 | mid = heigth[i-1] | ^~~~~~ | height main.c:22:13: note: each undeclared identifier is reported only once for each function it appears in main.c:22:2...
s017454753
p00001
C
#include <stdio.h> int main(void) { int large; int mid; int low; int input; int i; int height[10]; i = 0; while(i++ < 10) { scanf("%d", &(height[i-1])); if(i==1) low = mid = large = height[0]; if(height[i-1]>large) { large = height[i-1]; } else if(height[i-1]>mid) { ...
main.c: In function 'main': main.c:22:24: error: expected ';' before '}' token 22 | mid = height[i-1] | ^ | ; 23 | } | ~
s910255049
p00001
C
#include<stdio.h> int main(){ int a[10], n; int max = 0; for (int i = 0; i < 10; i++) { scanf_s("%d", &a[i]); } for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { if (a[j + 1] > a[j]) { max = a[j]; a[j] = a[j + 1]; a[j + 1] = max; } } } printf("%d\n", a[0]); print...
main.c: In function 'main': main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scanf_s("%d", &a[i]); | ^~~~~~~ | scanf
s150979296
p00001
C
int main(){ int i,j,x,a[10],b[10]; for (i=1;i<=10;i++) { scanf("%d\n",&a[i]); } x=1; for (j=i;j<=10;j++){ for (i=1;i<=10;i++){ if (a[i]==x) {b[j]=a[i];} } x++; } for (i=8;i<=10;i++) { printf("%d\n",b[i]); return 0; }
main.c: In function 'main': main.c:4:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d\n",&a[i]); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:4:1: warning: incompatible ...
s004454064
p00001
C
#include <stdio.h> int main(){ int i,j,x,a[10],b[10]; for (i=1;i<=10;i++) { scanf("%d\n",&a[i]); } x=1; for (j=i;j<=10;j++){ for (i=1;i<=10;i++){ if (a[i]==x) {b[j]=a[i];} } x++; } for (i=8;i<=10;i++) { printf("%d\n",b[i]); return 0; }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s439722925
p00001
C
????????????
main.c:1:1: error: expected identifier or '(' before '?' token 1 | ???????????? | ^
s779334430
p00001
C
#include<stdio.h> int main(){ int a,i,j; int a[10]; for(i=0;i<10;i++){ scanf("%d",&a[i]); } for(i=0;i<9;i++){ for(j=0;j<9-i;j++){ if(a[j]<a[j+1]){ int temp =a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } for(i=0;i<3;i++){ printf("%d\n",a[i]); } return 0;
main.c: In function 'main': main.c:4:13: error: conflicting types for 'a'; have 'int[10]' 4 | int a[10]; | ^ main.c:3:13: note: previous declaration of 'a' with type 'int' 3 | int a,i,j; | ^ main.c:20:49: error: expected declaration or statement at end of inpu...
s883753627
p00001
C
include <stdio.h> int main(void) { int a[10],i,N1,N2,N3; N1=0; N2=0; N3=0; for(i = 0;i < 9; i++){ scanf("%d\n", &a[i]); if(a[i] > N1){ N3=N2; N2=N1; N1=a[i]; } else if(a[i] > N2){ N3=N2; N2=a[i]; } else if(a[i] > N3){ N3=a[i]; } } printf("%...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s277848680
p00001
C
#include <stdio.h> int main(){ int a[10],i,max[3],tmp; for(i=0;i<10;i++){ scanf("%d",&a[i]); if(x>=0 && x<=10000){ i--; } } max[0]=a[0]; max[1]=a[1]; max[2]=a[2]; for(i=3;i<10;i++){ if(max[2]<a[i]){ tmp=a[i]; a[i]=max[2]; ...
main.c: In function 'main': main.c:6:12: error: 'x' undeclared (first use in this function) 6 | if(x>=0 && x<=10000){ | ^ main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
s505756992
p00001
C
int main(){ int a[10],i,max[3],tmp; for(i=0;i<10;i++){ scanf("%d",&a[i]); if(x<=0 && x>=10000){ i--; } } max[0]=a[0]; max[1]=a[1]; max[2]=a[2]; for(i=3;i<10;i++){ if(max[2]<a[i]){ tmp=a[i]; a[i]=max[2]; max[2]=tm...
main.c: In function 'main': main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d",&a[i]); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:4:9: warning:...
s283269602
p00001
C
#include<stdio.h> #define NUMBER 10 int main(void){ int i,j,temp,num[NUMBER],count=0; for(i = 0;i < NUMBER;i++){ scanf("%d",&num[i]); } for(i = 0;i < NUMBER;i++){ for(j = 0;j < (NUMBER-1)-i;j++){ if(num[j] > num[j+1]){ ...
main.c: In function 'main': main.c:23:21: error: implicit declaration of function 'N' [-Wimplicit-function-declaration] 23 | num[N(UMBER-1)-i] = temp; | ^ main.c:23:23: error: 'UMBER' undeclared (first use in this function); did you mean 'NUMBER'? 23 | num...
s496233910
p00001
C
#include <stdio.h> int comp( const void *c1, const void *c2 ); int main(void){ int a[10],i; for(i=0;i<10;i++){ scanf("%d",&a[i]); } qsort( a, 10, sizeof(int),comp); printf("%d\n%d\n%d\n",a[9],a[8],a[7]); return 0; }
main.c: In function 'main': main.c:8:1: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration] 8 | qsort( a, 10, sizeof(int),comp); | ^~~~~
s020532702
p00001
C
#include<stdio.h> int main(){ int h1 = 0,h2 = 0, h3 = 0,s,input; for(s = 0; s < 10; s++){ if(h1 < input){ h3 = h2; h2 = h1; h1 = input; } else { if(h2 < input){ h3 = h2; h2 = input; } else { if(h3 < input){ h3 = input; ...
main.c: In function 'main': main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s791039417
p00001
C
#include<stdio.h> int main(){ int h1 = 0,h2 = 0, h3 = 0,s,input; for(s = 0; s < 10; s++){ scanf("%d\n",input); if(h1 < input){ h3 = h2; h2 = h1; h1 = input; } else { if(h2 < input){ h3 = h2; h2 = input; } else { if(h3 < input){ ...
main.c: In function 'main': main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s512642439
p00001
C
#include<stdio.h> int main(void){ int h1 = 0,h2 = 0, h3 = 0,s,input; for(s = 0; s < 10; s++){ scanf("%d\n",input); if(h1 < input){ h3 = h2; h2 = h1; h1 = input; } else { if(h2 < input){ h3 = h2; h2 = input; } else { if(h3 < input){...
main.c: In function 'main': main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s569055862
p00001
C
#include<stdio.h> int main(void){ int h1 = 0,h2 = 0, h3 = 0,s,input; for(s = 0; s < 10; s++){ scanf("%d\n",input); if(h1 < input){ h3 = h2; h2 = h1; h1 = input; } else { if(h2 < input){ h3 = h2; h2 = input; } else { if(h3 < input){...
main.c: In function 'main': main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s958377544
p00001
C
#include<stdio.h> int main(void){ int h1 = 0,h2 = 0, h3 = 0,s,input; for(s = 0; s =< 10; s++){ scanf("%d\n",input); if(h1 < input){ h3 = h2; h2 = h1; h1 = input; } else { if(h2 < input){ h3 = h2; h2 = input; } else { if(h3 < input)...
main.c: In function 'main': main.c:5:20: error: expected expression before '<' token 5 | for(s = 0; s =< 10; s++){ | ^
s796796802
p00001
C
#include<stdio.h> int main (void){ int x1=0,x2=0,x3=0,input,s; for(s=0;s<10;s++){ scanf("%d\n",&input); if(x1 < input){ x3 = x2; x2 = x1; x1 = input; }else{ if(x2 < input){ x3 = x2; x2 = input; }e...
main.c: In function 'main': main.c:22:5: error: expected declaration or statement at end of input 22 | return(0); | ^~~~~~
s664277066
p00001
C
#include<stdio.h> int main(void){ int a[3]={0},i,x; for(i=1;i<=10;i++;){ scanf("%d",&x); if(a[0]<=x){ a[2]=a[1]; a[1]=a[0]; a[0]=x; } else if(a[1]<=x){ a[2]=a[1]; a[1]=x; } else if(a[2]<=x){ a[...
main.c: In function 'main': main.c:4:22: error: expected ')' before ';' token 4 | for(i=1;i<=10;i++;){ | ~ ^ | )
s585257155
p00001
C
#include <stdio.h> int main(void){ int m[10]; int i; for(i=0; i<10; i++) scanf("%d", &m[i]); int m1, m2, m3; m1=m[0]; for(i=1; i<10 i++){ if(m1<m[i]) m1=m[i]; } if(m1==m[0]) m2=m[1]; else m2=m[0]; for(i=0; i<10; i++){ if(m2<m[i] && m[i]<m1) m2=m[i]; } if(m1!=m[0] && m2!=m[0]) m3=m[0]; else if(m1!=m[1] && m...
main.c: In function 'main': main.c:15:14: error: expected ';' before 'i' 15 | for(i=1; i<10 i++){ | ^~ | ; main.c:44:8: error: expected ';' before '}' token 44 | m3=m[i] | ^ | ; 45 | 46 | } | ~
s129389648
p00001
C
#include <stdio.h> int main(){ int max=0, mid=0, min=0; int h=0; int i=0 for(i=0;i<10;i++){ scanf("%d", &h); if(0>h || h>10000){ printf("error\n"); return 0; } if(max<h){ min=mid; mid=max; max=h; } else if(mid<h){ min=mid; mid=h; } else i...
main.c: In function 'main': main.c:6:3: error: expected ',' or ';' before 'for' 6 | for(i=0;i<10;i++){ | ^~~ main.c:6:19: error: expected ';' before ')' token 6 | for(i=0;i<10;i++){ | ^ | ; main.c:6:19: error: expected statement before ')' token
s796130852
p00001
C
#include <stdio.h> int main(){ int max=0; int mid=0; int min=0; int h=0; int i=0 for(i=0;i<10;i++){ scanf("%d", &h); if(0>h || h>10000){ printf("error\n"); return 0; } if(max<h){ min=mid; mid=max; max=h; } else if(mid<h){ min=mid; mid=h; ...
main.c: In function 'main': main.c:8:3: error: expected ',' or ';' before 'for' 8 | for(i=0;i<10;i++){ | ^~~ main.c:8:19: error: expected ';' before ')' token 8 | for(i=0;i<10;i++){ | ^ | ; main.c:8:19: error: expected statement before ')' token
s516719546
p00001
C
#include<stdio.h> int main(void){ int i; int j; int k; int m=10; int p; int n[10] = { 0 }; for (p = 0; p < 10; p++) scanf_s("%d", &n[p]); if (n[9] < 0){ return 0; } if (n[9] > 10000){ return 0; } else{ for (i = 0; i < m; i++){ for (j = i + 1; j < m; j++){ if (n[i]> n[j]){ ...
main.c: In function 'main': main.c:13:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 13 | scanf_s("%d", &n[p]); | ^~~~~~~ | scanf
s882140323
p00001
C
#include <stdio.h> int main(void) { int indat[10]; int max; int i, j; for (i = 0; i < 10; i++){ scanf_s("%d", &indat[i]); } for (i = 0; i < 3; i++){ max = 0; for (j = 0; j < 10; j++){ if (indat[j] > indat[max]){ max = j; } } printf("%d\n", indat[max]); indat[max] = 0; } return 0; }
main.c: In function 'main': main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scanf_s("%d", &indat[i]); | ^~~~~~~ | scanf
s653157060
p00001
C
#include <stdio.h> int main(){ int a[3]; int b; int i, j, k; for(i = 0; i < 3; i++){ a[i] = 0; } for(i = 0; i < 10; i++){ scanf("%d", &b); for(j = 0; j < 3; j++){ if(a[j] < b){ for(k = j; k < 2; k++){ a[k+1] a[k];...
main.c: In function 'main': main.c:17:27: error: expected ';' before 'a' 17 | a[k+1] a[k]; | ^~ | ;
s317947947
p00001
C
#include<stdio.h> int main(){ int ans[3]; int tmp; for(i=1;i<=10;i++){ int height; scanf("%d",&height); if(height[i-1] <= height[i]){ tmp = height[i-1] height[i] = tmp; } for(i=0;i<=3;i++){ printf("%d\n",height[i]); } return 0; }
main.c: In function 'main': main.c:6:7: error: 'i' undeclared (first use in this function) 6 | for(i=1;i<=10;i++){ | ^ main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in main.c:10:22: error: expected ';' before 'height' 10 | tmp = height[i-1] ...
s282375769
p00001
C
#include<stdio.h> int main(){ int ans[3]; int tmp; int i; for(i=1;i<=10;i++){ int height; scanf("%d",&height); if(height[i-1] <= height[i]){ tmp = height[i-1] height[i] = tmp; } for(i=0;i<=3;i++){ printf("%d\n",height[i]); } return 0; }
main.c: In function 'main': main.c:10:14: error: subscripted value is neither array nor pointer nor vector 10 | if(height[i-1] <= height[i]){ | ^ main.c:10:29: error: subscripted value is neither array nor pointer nor vector 10 | if(height[i-1] <= height[i]){ | ...
s941818664
p00001
C
#include<stdio.h> int main(){ int ans[3]; int tmp; int i; for(i=1;i<=10;i++){ int height; scanf("%d",&height); if(height[i-1] <= height[i]){ tmp = height[i-1]; height[i] = tmp; } for(i=0;i<=3;i++){ printf("%d\n",height[i]); } return 0; }
main.c: In function 'main': main.c:10:14: error: subscripted value is neither array nor pointer nor vector 10 | if(height[i-1] <= height[i]){ | ^ main.c:10:29: error: subscripted value is neither array nor pointer nor vector 10 | if(height[i-1] <= height[i]){ | ...
s590288099
p00001
C
#include<stdio.h> int main (void){ int x1=0,x2=0,x3=0,input,s; for(s=0;s<10;s++){ scanf("%d\n",&input); if(x1 < input){ x3 = x2; x2 = x1; x1 = input; }else{ if(x2 < input){ x3 = x2; x2 = input; }e...
main.c: In function 'main': main.c:22:5: error: expected declaration or statement at end of input 22 | return(0); | ^~~~~~
s625582875
p00001
C
#include <stdio.h> void swap(int, int); int main(void) { int i, j; int height[10]; for (i = 0; i <= 9; i++) scanf("%d", &height[i]); for (i = 1; i <= 9; i++) for (j = i; j <= 9; j++) if (height[j - 1] <= height[j]) swap(height[j - 1], height[j]); for (i = 0; i < 3; i++) printf("%d", height[i]);...
main.c:22:6: error: conflicting types for 'swap'; have 'void(int *, int *)' 22 | void swap(int *a, int *b) { | ^~~~ main.c:3:6: note: previous declaration of 'swap' with type 'void(int, int)' 3 | void swap(int, int); | ^~~~ main.c: In function 'swap': main.c:24:11: error: assignment to 'in...
s517207001
p00001
C
#include <stdio.h> void swap(int, int); int main(void) { int i, j; int height[10]; for (i = 0; i <= 9; i++) scanf("%d", &height[i]); for (i = 1; i <= 9; i++) for (j = i; j <= 9; j++) if (height[j - 1] <= height[j]) swap(height[j - 1], height[j]); for (i = 0; i < 3; i++) printf("%d", height[i]);...
main.c:22:6: error: conflicting types for 'swap'; have 'void(int *, int *)' 22 | void swap(int *a, int *b) { | ^~~~ main.c:3:6: note: previous declaration of 'swap' with type 'void(int, int)' 3 | void swap(int, int); | ^~~~
s555286730
p00001
C
#include <stdio.h> void swap(int, int); int main(void) { int i, j; int height[10]; for (i = 0; i <= 9; i++) scanf("%d", &height[i]); for (i = 1; i <= 9; i++) for (j = i; j <= 9; j++) if (height[j - 1] <= height[j]) swap(&height[j - 1], &height[j]); for (i = 0; i < 3; i++) printf("%d\n", height[...
main.c: In function 'main': main.c:15:38: error: passing argument 1 of 'swap' makes integer from pointer without a cast [-Wint-conversion] 15 | swap(&height[j - 1], &height[j]); | ^~~~~~~~~~~~~~ | | ...
s156054169
p00001
C
#include <stdio.h> int main (void) { int a[10]={} int i; for(i=0;i<9;i++) scanf("%d",&a[i]); int k,j; for(i=0;i<8;i++) for(k=0;k<8;k++) if(a[k]<a[k+1]){ j=a[k]; a[k]=a[k+1]; a[k+1]=j; } for(i=0;i<2;i++){ printf("%d",a[i]); putchar('\n'); } return 0; }
main.c: In function 'main': main.c:5:1: error: expected ',' or ';' before 'int' 5 | int i; | ^~~ main.c:6:5: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<9;i++) | ^ main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
s281425431
p00001
C
#include<stdio.h> int main(){ int a[10],i,a,b,c; for(i=0;i<10;i++){ scanf("%d",&a[i]); } for(i=0;i<9;i++){ if(a[i]>a[i+1]) a=a[i]; else a=a[i+1]; } for(i=0;i<9;i++){ if(a[i]>a[i+1] && a[i]<a) b=a[i]; else b=a[i+1]; } for(i=0;i<9;i++){ if(a[i]>a[i+1] && a[i]<b) c=a[i]; else c=a[i+1]; } printf("%d\n",a); printf("%d\...
main.c: In function 'main': main.c:3:13: error: conflicting types for 'a'; have 'int' 3 | int a[10],i,a,b,c; | ^ main.c:3:5: note: previous declaration of 'a' with type 'int[10]' 3 | int a[10],i,a,b,c; | ^
s860283525
p00001
C
#include <stdio.h> int main() { int a,b,c,t1=0,t2=0,t3=0,i; scanf("%d %d",b,c); if(b>=c) t1=b; t2=c; else t1=c; t2=b; for(i=3;i<=10;i++) { scanf("%d",&a); if(a>t1) t1=a; else if(a<t1 && a>t2) t2=a; else if(a<t1 && a<t2 && a>t3) t3=a; } printf("%d\n%d\n%d\n",t1,t2,t3); return 0; }
main.c: In function 'main': main.c:9:9: error: 'else' without a previous 'if' 9 | else t1=c; t2=b; | ^~~~
s372852453
p00001
C
#include <stdio.h> int main (void){ int max[3]={0}; int cont,i; for(i=0;i<10;i++){ scanf("%d",&cont); if(max[0]<cont){ max[2]=max[1]; max[1]=max[0]; max[0]=cont; } else if(max[1]<cont){ max[2]=max[1]; max[1]=cont; } else if(max[2]<cont) max[2]=cont; } ...
main.c: In function 'main': main.c:21:3: error: expected declaration or statement at end of input 21 | return (0); | ^~~~~~
s393328993
p00001
C
include<stdio.h> void main(){ printf("山の高さ1(整数)\n"); printf("山の高さ2(整数)\n"); printf("山の高さ3(整数)\n"); printf("山の高さ4(整数)\n"); printf("山の高さ5(整数)\n"); printf("山の高さ6(整数)\n"); printf("山の高さ7(整数)\n"); printf("山の高さ8(整数)\n"); printf("山の高さ9(整数)\n"); printf("山の高さ10(整数)\n"); int a[],max1,max2,max3; for(i=0;i<10;i++){ scanf("%d",&a[...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s210078056
p00001
C
#include<stdio.h> int main(){ int i,j,k,x; for(i=1;1<=10;i++){ int height of mountain i; scanf("%d",&height of mountain i); } for(k=1;k<=3;k++){ for(j=1;j<=9;j++){ if(height of mountain j>height of mountain j+1){ x=height of mountain j+1 height of mountain j+1=height of mountain j; height of mountain...
main.c: In function 'main': main.c:6:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'of' 6 | int height of mountain i; | ^~ main.c:6:28: error: unknown type name 'of' main.c:6:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i' ...
s242807101
p00001
C
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <math.h> /**------------ SUB ROUTIONE -------------*/ /**------------ SUB ROUTIONE -------------*/ int main() { int i,k,wk; char inp[96]; int dt[10]; int work[10]; /**--init --**/ /**--input--**/ for (i=0 ; i<10 ; i++) { ...
main.c: In function 'main': main.c:22:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 22 | gets(inp); | ^~~~ | fgets main.c:23:17: error: implicit declaration of function 'sscanf_s'; did you mean '...
s462647757
p00001
C
#include <stdio.h> #include <stdlib.h> int comp(const void* a, const void* b){ return *(int*)a - *(int*)b; } int main(){ int i, hei[10] for(i=0;i<10;i++){ scanf("%d", &hei[i]); } qsort(hei, 10, sizeof(int), compare); for(i=0;i<3;i++){ printf("%d\n", hei[i]); } return 0; }
main.c: In function 'main': main.c:10:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 10 | for(i=0;i<10;i++){ | ^~~ main.c:10:25: error: expected ';' before ')' token 10 | for(i=0;i<10;i++){ | ^ | ; m...
s795876645
p00001
C
#include <stdio.h> #include <stdlib.h> int comp(const void* a, const void* b){ return *(int*)a - *(int*)b; } int main(){ int i, hei[10]; for(i=0;i<10;i++){ scanf("%d", &hei[i]); } qsort(hei, 10, sizeof(int), compare); for(i=0;i<3;i++){ printf("%d\n", hei[i]); } return 0; }
main.c: In function 'main': main.c:14:37: error: 'compare' undeclared (first use in this function); did you mean 'comp'? 14 | qsort(hei, 10, sizeof(int), compare); | ^~~~~~~ | comp main.c:14:37: note: each undeclared identifi...
s891132178
p00001
C
#include <stdio.h> #include <stdlib.h> #define MAXN 10 typedef struct DNode { int data; DNode *next; }llist; void creatlist(llist*&head,int a[],int n) { llist *pre,*q; head=(llist *)malloc(sizeof(llist)); pre=head; for(int i=1;i<=n;i++) { q=(llist *)malloc(sizeof(llist)); q->data=a[i]; pre->next=q; ...
main.c:7:3: error: unknown type name 'DNode' 7 | DNode *next; | ^~~~~ main.c:9:22: error: expected ';', ',' or ')' before '&' token 9 | void creatlist(llist*&head,int a[],int n) | ^ main.c:23:18: error: expected ';', ',' or ')' before '&' token 23 | void swapi(llist*&L) ...
s988811061
p00001
C
#include <stdio.h> // Sample Input // 1819 // 2003 // 876 // 2840 // 1723 // 1673 // 3776 // 2848 // 1592 // 922 // Output for the Sample Input // 3776 // 2848 // 2840 int main(){ int i = 0, j, num[10], dumy; while(i < 10;){ scanf("%d",&num[i]); for(j = i + 1; j < 10; j++){ if(num[i] > num[j]){ dumy =...
main.c: In function 'main': main.c:22:21: error: expected ')' before ';' token 22 | while(i < 10;){ | ~ ^ | )
s982892114
p00001
C
#include <stdio.h> // Sample Input // 1819 // 2003 // 876 // 2840 // 1723 // 1673 // 3776 // 2848 // 1592 // 922 // Output for the Sample Input // 3776 // 2848 // 2840 int main(){ int i = 0, j, num[10], dumy; while(i < 10;){ scanf("%d",&num[i]); for(j = i + 1; j < 10; j++){ if(num[i] > num[j]){ dumy =...
main.c: In function 'main': main.c:22:21: error: expected ')' before ';' token 22 | while(i < 10;){ | ~ ^ | )
s492076158
p00001
C
#include <stdio.h> // Sample Input // 1819 // 2003 // 876 // 2840 // 1723 // 1673 // 3776 // 2848 // 1592 // 922 // Output for the Sample Input // 3776 // 2848 // 2840 int main(){ int i = 0, j, num[10], dumy; while(i < 10;){ scanf("%d",&num[i]); for(j = i + 1; j < 10; j++){ if(num[i] > num[j]){ dumy =...
main.c: In function 'main': main.c:22:21: error: expected ')' before ';' token 22 | while(i < 10;){ | ~ ^ | )
s605261922
p00001
C
#include<stdio.h> int main(){ int element; int height[10000]; for(int i = 0;;i++){ scanf("%d",&height[i]); if(height[i]!=) { element=i; break; } } return 0; }
main.c: In function 'main': main.c:7:15: error: expected expression before ')' token 7 | if(height[i]!=) { | ^
s977227493
p00001
C
void main () { int number (10); int i, j, a, n; printf("Enter the value \n"); scanf("%d",&n); printf("Enter the numbers \n"); for(i=0;i<n;i++) scanf("%d", &number[i]); for(i=0;i<n;i++) { for (j=i+1;j<n;j++) {if (number [i] <number [j]) { a= number[i]= number[j]; number[j]=a; }}} printf("the nu...
main.c: In function 'main': main.c:4:17: error: expected declaration specifiers or '...' before numeric constant 4 | int number (10); | ^~ main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("Enter the value \n"); | ^~...
s473408747
p00001
C
#include <stdio.h> int main(){ /*int a,b; for(a=1;a<=9;a++){ for(b=1;b<=9;b++){ printf("%dx%d=%d\n",a,b,a*b); } }*/ int mtop [10]={100,200,300,400,500,600,700,800,900,1000}; */ mtop[0]=1000*/ return 0; }
main.c: In function 'main': main.c:12:4: error: expected expression before '/' token 12 | */ mtop[0]=1000*/ | ^
s220818624
p00001
C
#include<stdio.h> #include<stlib.h> int main() { log long int num1,num2; while(scanf("%d %d",num1,num2)!=EOF){ num=num1*num2; while(num1 !=num2) if(num1>num2) num1=num1-num2; else num2=num2-num1; } printf("%d %d",num1,num2); }
main.c:2:9: fatal error: stlib.h: No such file or directory 2 | #include<stlib.h> | ^~~~~~~~~ compilation terminated.
s431656621
p00001
C
#include<stdio.h> int main() { int i,c,a[11],temp; for(c=0;c<10;c++) scanf("%d",&a[c]); for(i=0;i< 9; i++){ for(j=0; j< 9-i;j++){ if(a[j]>a[j+1]){ temp=a[j+1]; a[j+1]=a[j]; a[j]=temp; } } } printf("%d\n%d\n%d"...
main.c: In function 'main': main.c:9:13: error: 'j' undeclared (first use in this function) 9 | for(j=0; j< 9-i;j++){ | ^ main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
s395498563
p00001
C
#include<stdio.h> int main() { int i,c,j,a[11],temp; for(c=0;c<10;c++)scanf("%d",&a[c]); for(i=0;i<9;i++){ for(j=0;j<9 -i;j++){ if(a[j]>a[j+1]){ temp=a[j+1]; a[j+1]=a[j]; a[j]=temp; } } } printf("%d\n%d\n%d\'n",a[9]...
main.c:18:1: error: expected identifier or '(' before 'return' 18 | return 0; | ^~~~~~ main.c:19:1: error: expected identifier or '(' before '}' token 19 | } | ^
s312733329
p00001
C
#include<stdio.h> int main() { int i,c,j,a[11],temp; for(c=0;c<10;c++)scanf("%d",&a[c]); for(i=0;i<9;i++){ for(j=0;j<9 -i;j++){ if(a[j]>a[j+1]){ temp=a[j+1]; a[j+1]=a[j]; a[j]=temp; } } } printf("%d\n%d\n%d\'n",a[9]...
main.c:18:1: error: expected identifier or '(' before 'return' 18 | return 0; | ^~~~~~ main.c:19:1: error: expected identifier or '(' before '}' token 19 | } | ^
s194656765
p00001
C
#include <iostream> using namespace std; int main() { int height1 = 0; int height2 = 0; int height3 = 0; int x; while (cin >> x){ if (x>=height1){ height1 = x; } else{ if (x>=height2){ height2 = x; } else{ ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s078122892
p00001
C
#include<stdio.h> int main() { int a1[10],i,j,x; for(i=0;i<10;i++) scanf("%d"&a[i]); for(i=9;i>0;i--) for(j=0;j<i;j++) { if(a1[j]<a1[j+1]) { x=a1[j]; a1[j]=a1[j+1]; a1[j+1]=x; } } print...
main.c: In function 'main': main.c:8:20: error: 'a' undeclared (first use in this function) 8 | scanf("%d"&a[i]); | ^ main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in
s655198212
p00001
C
int height[10]; void scan(){ for(int i = 0; i < 10; i++){ scanf("%d", &height[i]); } } void sorting(){ for(int numb = 0; numb < 9; numb++){ for(int num = 0; num < 9-numb; num++){ if(height[num] < height[num+1]){ int stock = height[num]; height[num] = hei...
main.c: In function 'scan': main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | scanf("%d", &height[i]); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int height[10]; main.c:5:5: warnin...
s489327716
p00001
C
#include<stdio.h> int main(){ int i,j,kazu; int max=0,max1=0,max2=0; int x[10]; for(j=0;j<10;j++){ scanf("%d",&kazu); x[i]=kazu; } for(i=0;i<9;i++){ if(i=0){ max=x[i]; max1=x[i]; max2=x[i]; }else{ if(max<x[i]){...
main.c: In function 'main': main.c:31:1: error: expected declaration or statement at end of input 31 | } | ^
s683500316
p00001
C
#include<stdio.h> int main(){ int i,j,kazu; int max=0,max1=0,max2=0; int x[10]={0}; for(j=0;j<10;j++){ scanf("%d",&kazu); x[i]=kazu; } for(i=0;i<9;i++){ if(i=0){ max=x[i]; max1=x[i]; max2=x[i]; }else{ if(max<x[...
main.c: In function 'main': main.c:31:1: error: expected declaration or statement at end of input 31 | } | ^
s615269160
p00001
C
#include<stdio.h> int main(){ int i,kazu; int max=0,max1=0,max2=0; int x[10]={0}; for(i=0;i<10;i++){ scanf("%d",&kazu); x[j]=kazu; if(i=0){ max=x[i]; max1=x[i]; max2=x[i]; }else{ if(max<x[i]){ ...
main.c: In function 'main': main.c:10:11: error: 'j' undeclared (first use in this function) 10 | x[j]=kazu; | ^ main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
s405774658
p00001
C
#include <stdio.h> int main(void){ int mountain[10] = {0}; int i=0; int j=0; int k=0; int count=0; int m1=0; int m2=0; int m3=0; for(i=0; i<10; i++){ scanf("%d", &j); mountain[i] = j; } for(i=0; i<10; i++){ j=mountain[i]; while(k<10...
main.c: In function 'main': main.c:22:19: error: expected expression before '<' token 22 | if(j =< mountain[k]){ | ^
s036465121
p00001
C
#include <stdio.h> int main(void){ int mountain[10] = {0}; int i=0; int j=0; int count=0; int m1=0; int m2=0; for(i=0; i<10; i++){ scanf("%d", &j); mountain[i] = j; } do{ count = 0; for(i=0; i<9; i++){ m1 = mountain[i]; m2 = m...
main.c: In function 'main': main.c:30:12: error: 'conut' undeclared (first use in this function); did you mean 'count'? 30 | }while(conut != 0) | ^~~~~ | count main.c:30:12: note: each undeclared identifier is reported only once for each function it appears in main.c:30:23: erro...
s232461536
p00001
C
#include <stdio.h> int main(void){ int mountain[10] = {0}; int i=0; int j=0; int count=0; int m1=0; int m2=0; for(i=0; i<10; i++){ scanf("%d", &j); mountain[i] = j; } do{ count = 0; for(i=0; i<9; i++){ m1 = mountain[i]; m2 = m...
main.c: In function 'main': main.c:30:23: error: expected ';' before 'printf' 30 | }while(count != 0) | ^ | ; 31 | 32 | printf("%d\n", mountain[0]); | ~~~~~~
s469789875
p00001
C
#include <stdio.h> int main(void){ int mountain[10] = {0}; int i=0; int j=0; int count=0; int m1=0; int m2=0; for(i=0; i<10; i++){ scanf("%d", &j); mountain[i] = j; } do{ count = 0; for(i=0; i<9; i++){ m1 = mountain[i]; m2 = m...
main.c: In function 'main': main.c:30:23: error: expected ';' before 'printf' 30 | }while(count != 0) | ^ | ; 31 | 32 | printf("%d\n", mountain[0]); | ~~~~~~
s519762568
p00001
C
#include<stdio.h> int main(){ int i,kazu,judge1,judge2; int max=0,max1=0,max2=0; int x[10]; for(i=0;i<10;i++){ scanf("%d",&kazu); x[i]=kazu; } do{ count = 0; for(i=0; i<9; i++){ judge1 = x[i]; judge2 = x[i+1]; if(judge1...
main.c: In function 'main': main.c:14:7: error: 'count' undeclared (first use in this function) 14 | count = 0; | ^~~~~ main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
s801573588
p00001
C
#include<stdio.h> int main() { int f=0, s=0, t=0, n, i; for (i=0; i<10; i++){ scanf("%d", &n); if(f<n){ t = s; s = f; f = n; }else if(s<n){ t = s; s = n; }else if(t<n)} t = n; } printf("%d\n%d\...
main.c: In function 'main': main.c:15:22: error: expected expression before '}' token 15 | }else if(t<n)} | ^ main.c: At top level: main.c:18:13: error: expected declaration specifiers or '...' before string constant 18 | printf("%d\n%d\n%d\n", f, s, t); | ...