submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s469983770
|
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\n%d\n", f, s, t);
return 0;
}
|
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s762305751
|
p00001
|
C
|
#include <stdio.h>
int main (void){
int i, k;
int m1 , m2 , m3;
int height[10];
for(i=0; i<10; i++){
scanf("%d",&height[i]);
}
m1=height[0];
m2=height[0];
m3=height[0];
for(i=0; i<10; i++){
if(m1<height[i]){
m1=height[i];
k=i;
}
} height[k]=0;
for(i=0; i<10; i++){
if(m2<height[i]){
m2=height[i];
k=i;
}
} height[k]=0;
for(i=0; i<10; i++){
if(m3<height[i]){
m3=height[i];
k=i;
}
} height[k]=0;
printf("%d\n%d\n%d\n",m1, m2, m3);
retrun 0;
}
|
main.c: In function 'main':
main.c:46:3: error: 'retrun' undeclared (first use in this function)
46 | retrun 0;
| ^~~~~~
main.c:46:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:46:9: error: expected ';' before numeric constant
46 | retrun 0;
| ^~
| ;
|
s798508891
|
p00001
|
C
|
#include <stdio.h>
int main (void){
int i, k;
int m1 , m2 , m3;
int height[10];
for(i=0; i<10; i++){
scanf("%d",&height[i]);
}
m1=height[0];
m2=height[0];
m3=height[0];
for(i=0; i<10; i++){
if(m1<height[i]){
m1=height[i];
k=i;
}
} height[k]=0;
for(i=0; i<10; i++){
if(m2<height[i]){
m2=height[i];
k=i;
}
} height[k]=0;
for(i=0; i<10; i++){
if(m3<height[i]){
m3=height[i];
k=i;
}
}
printf("%d\n%d\n%d\n",m1, m2, m3);
retrun 0;
}
|
main.c: In function 'main':
main.c:46:3: error: 'retrun' undeclared (first use in this function)
46 | retrun 0;
| ^~~~~~
main.c:46:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:46:9: error: expected ';' before numeric constant
46 | retrun 0;
| ^~
| ;
|
s298634617
|
p00001
|
C
|
#include <stdio.h>
int main (void){
int i, k, j;
int m1 , m2 , m3;
int height[10];
for(i=0; i<10; i++){
scanf("%d",&height[i]);
}
m=height[0];
for(j=0; j<3; j++){
for(i=0; i<10; i++){
if(m<height[i]){
m=height[i];
k=i;
}
} height[k]=0;
printf("%d",m);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:3: error: 'm' undeclared (first use in this function); did you mean 'm3'?
13 | m=height[0];
| ^
| m3
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
|
s832845037
|
p00001
|
C
|
#include <stdio.h>
int main()
{
int a[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
{
for(j=0;j<10;j++)
{
if(a[i]>a[j])
{
n=a[i];
a[i]=a[j];
a[j]=n;
}
}
}
for(i=0;i<3;i++)
{
prntf("%d\n",a[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:25:9: error: implicit declaration of function 'prntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
25 | prntf("%d\n",a[i]);
| ^~~~~
| printf
|
s133985132
|
p00001
|
C
|
#include <stdio.h>
int main ()
{
int height[10];
int i, j, a;
for (i = 0; i < 10; ++i)
scanf("%d", &height[i]);
for (i = 0; i < 10; ++i)
{
for (j = i + 1; j < 10; ++j)
{
if (height[i] < height[j])
{
a = height[i];
height[i] = height[j];
height[j] = a;
}
}
}
printf("\n");
for (i = 0; i < 3; ++i)
{
printf("%d\n", height[i]);
}
return 0;
|
main.c: In function 'main':
main.c:26:5: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s821035083
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int i = 0;
int height[10] ={NULL};
int temp, flag=0;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
do {
flag = 0;
for (i = 0; i < 9; i++) {
if (height[i] > height[i + 1]) {
flag = 1;
temp = height[i + 1];
height[i + 1] = height[i];
height[i] = temp;
}
}
} while (flag);
printf("%d\n%d\n%d\n", height[9], height[8], height[7]);
return 0;
|
main.c: In function 'main':
main.c:5:26: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
5 | int height[10] ={NULL};
| ^~~~
main.c:5:26: note: (near initialization for 'height[0]')
main.c:26:9: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s745705966
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int i = 0;
int height[10] ={NULL};
int temp, flag=0;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
do {
flag = 0;
for (i = 0; i < 9; i++) {
if (height[i] > height[i + 1]) {
flag = 1;
temp = height[i + 1];
height[i + 1] = height[i];
height[i] = temp;
}
}
} while (flag);
printf("%d\n%d\n%d\n", height[9], height[8], height[7]);
return 0;
|
main.c: In function 'main':
main.c:5:26: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
5 | int height[10] ={NULL};
| ^~~~
main.c:5:26: note: (near initialization for 'height[0]')
main.c:26:9: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s325609426
|
p00001
|
C
|
#include <stdio.
int main(){
int a[10];
int i, j, k;
for(i=0; i<10; ++i)
scanf("%d", &a[i]);
for(i=0; i<10; ++i){
for(j=i+1; j<10: ++j){
if(a[i] < a[j]){
k = a[i];
a[i] = a[j];
a[j] = k;
}
}
}
for(i=0; i<10; ++i)
printf("%d\n",a[i]);
return 0;
}
|
main.c:1:17: error: missing terminating > character
1 | #include <stdio.
| ^
main.c:1:10: fatal error: stdio.: No such file or directory
1 | #include <stdio.
| ^
compilation terminated.
|
s192248157
|
p00001
|
C
|
#include <stdio.h>
int main(){
int a[10];
int i, j, k;
for(i=0; i<10; ++i)
scanf("%d", &a[i]);
for(i=0; i<10; ++i){
for(j=i+1; j<10: ++j){
if(a[i] < a[j]){
k = a[i];
a[i] = a[j];
a[j] = k;
}
}
}
for(i=0; i<10; ++i)
printf("%d\n",a[i]);
return 0;
}
|
main.c: In function 'main':
main.c:8:32: error: expected ';' before ':' token
8 | for(j=i+1; j<10: ++j){
| ^
| ;
|
s951029282
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i;
int mon[9];
for(i=0;i<10;i++){
scanf("%d\n",mon[0]);
}
for(i=0; i< 10; i++){
for(j=10-1; j>i; j--){
if(mon[j] < mon[j-1]){
temp = mon[j];
mon[j] = mon[j-1];
mon[j-1] = temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",mon[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:10:9: error: 'j' undeclared (first use in this function)
10 | for(j=10-1; j>i; j--){
| ^
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:9: error: 'temp' undeclared (first use in this function)
12 | temp = mon[j];
| ^~~~
|
s824178358
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int mon[9];
for(i=0;i<10;i++){
scanf("%d\n",mon[0]);
}
for(i=0; i< 10; i++){
for(j=10-1; j>i; j--){
if(mon[j] < mon[j-1]){
temp = mon[j];
mon[j] = mon[j-1];
mon[j-1] = temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",mon[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:12:9: error: 'temp' undeclared (first use in this function)
12 | temp = mon[j];
| ^~~~
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
|
s318378639
|
p00001
|
C
|
#include<stdio.h>
int main(){
int a=0,b=0,c=0,i=0;
int tmp[9]={1819,
2003,
876,
2840,
1723,
1673,
3776,
2848,
1592,
922}
for(i=0;i<10;i++){
if(tmp[i]>a){
a=tmp[i];
}
if(tmp[i]>b){
b=tmp[i];
}
if(tmp[i]>c){
c=tmp[i];
}
}
printf("%d\n",a);
printf("%d\n",b);
printf("%d\n",c);
return 0;
}
|
main.c: In function 'main':
main.c:14:1: warning: excess elements in array initializer
14 | 922}
| ^~~
main.c:14:1: note: (near initialization for 'tmp')
main.c:16:5: error: expected ',' or ';' before 'for'
16 | for(i=0;i<10;i++){
| ^~~
main.c:16:21: error: expected ';' before ')' token
16 | for(i=0;i<10;i++){
| ^
| ;
main.c:16:21: error: expected statement before ')' token
|
s573923656
|
p00001
|
C
|
#include<stdio.h>
int main(void){
int i,j,x,data[10];
for(i=0;i<10;i++)
{
scanf("%d",&data[i]);
}
for(i=0;i<9;i++)
{
for(j=0;j<9-i;j++)
{
if(data[j]<data[j+1])
{
x=data[j];
data[j]=data[j+1];
data[j+1]=x;
}
}
}
for(i=0;i<3;i++)
{
printf("%d\n",data[i]);
}
rerurn 0;
}
|
main.c: In function 'main':
main.c:28:1: error: 'rerurn' undeclared (first use in this function)
28 | rerurn 0;
| ^~~~~~
main.c:28:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:7: error: expected ';' before numeric constant
28 | rerurn 0;
| ^~
| ;
|
s760087048
|
p00001
|
C
|
#include<stdio.h>
int main(){
int a[] = {1819,2003,876,2840,
1723,1673,3776,2848,1592,922};
int i, max=0, max2=0, max3=0;
max=max2=max3=a[0];
for(i=1; i<10; i++){
if (max < a[i]) {
max = a[i];
}
if(max < max2 <a[i]){
max2 = a[i];
}
if(max2 < max3 <a[i]){
max3 = a[i];
}
printf("%d\n", max);
printf("%d\n", max2);
printf("%d\n", max3);
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s672154584
|
p00001
|
C
|
include<stdio.h>
int main(){
int data[10];
int i,j,temp;
for(i=0;i<10;i++)
scanf("%d",&data[i]);
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(a[j]>a[i]){
temp = data[i];
data[i] = data[j];
data[j] = temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",a[i]);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s984498590
|
p00001
|
C
|
include<stdio.h>
int main(){
int data[10];
int i,j,temp;
for(i=0;i<10;i++){
scanf("%d",&data[i]);
}
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(a[j]>a[i]){
temp = data[i];
data[i] = data[j];
data[j] = temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",data[i]);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s205779070
|
p00001
|
C
|
#include<stdio.h>
int main(){
int a[]={1819, 2003, 876, 2840,1723,1673,3776,2848,1592,922}, i, fast, sec, third;
fast=2,sec=1,third=0;
for(i=0;i<10;i++){
}
for(i=0;i<10;i++){
if(fast<h[i]){
fast=h[i];
}else if(fast<h[i] || third<h[i]){
sec=h[i];
}else if(sec>h[i]){
third=h[i];
}
}
printf("%d\n",fast);
printf("%d\n",sec);
printf("%d\n",third);
return 0;
}
|
main.c: In function 'main':
main.c:9:9: error: 'h' undeclared (first use in this function)
9 | if(fast<h[i]){
| ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
|
s304186841
|
p00001
|
C
|
#include <stdio.h>
int main(void) {
int x,y,z,i,input; //??£?¨?
for(i=0;i<10,i++){
scanf("%d\n",&input); //????????\???
if(x<input){
y=z;
z=x;
x=input;
}else{
if(y<input){
z=y;
y=input;
}else{
if(z<input){
z=input;
}
}
}
}
printf("%d\n%d\n%d\n",x,y,z);
return 0;
}
|
main.c: In function 'main':
main.c:7:21: error: expected ';' before ')' token
7 | for(i=0;i<10,i++){
| ^
| ;
|
s216747996
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i, a[10] = {1819,2003,876,2840,1723,
1673,3776,2848,1592,922};
int i, j;
int dumy;
for(i=0; i<10; i++){
for(j=i+1; l<10; j++){
if(a[i] > a[j]){
dumy=a[i]
a[i]=a[j];
a[j]=a[i];
}
}
}
for(i=0; i<3; i++){
printf("%d\n", a[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:8:5: error: redeclaration of 'i' with no linkage
8 | int i, j;
| ^
main.c:5:5: note: previous declaration of 'i' with type 'int'
5 | int i, a[10] = {1819,2003,876,2840,1723,
| ^
main.c:14:13: error: 'l' undeclared (first use in this function)
14 | for(j=i+1; l<10; j++){
| ^
main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:13: error: expected ';' before 'a'
16 | dumy=a[i]
| ^
| ;
17 | a[i]=a[j];
| ~
|
s239288320
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i, a[10] = {1819,2003,876,2840,1723,
1673,3776,2848,1592,922};
int j;
int dumy;
for(i=0; i<10; i++){
for(j=i+1; l<10; j++){
if(a[i] < a[j]){
dumy=a[i]
a[i]=a[j];
a[j]=a[i];
}
}
}
for(i=0; i<3; i++){
printf("%d\n", a[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:14:13: error: 'l' undeclared (first use in this function)
14 | for(j=i+1; l<10; j++){
| ^
main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:13: error: expected ';' before 'a'
16 | dumy=a[i]
| ^
| ;
17 | a[i]=a[j];
| ~
|
s822207436
|
p00001
|
C
|
#include<stdio.h>
int i, j, dumy, a[10] = {1819,2003,876,2840,1723,
1673,3776,2848,1592,922};
for(i=0; i<10; i++){
for(j=i+1; j<10; j++){
if(a[i] < a[j]){
dumy=a[i];
a[i]=a[j];
a[j]=dumy;
}
}
}
for(i=0; i<3; i++){
printf("%d\n", a[i]);
}
return 0;
}
|
main.c:5:1: error: expected identifier or '(' before 'for'
5 | for(i=0; i<10; i++){
| ^~~
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
5 | for(i=0; i<10; i++){
| ^
main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
5 | for(i=0; i<10; i++){
| ^~
main.c:15:1: error: expected identifier or '(' before 'for'
15 | for(i=0; i<3; i++){
| ^~~
main.c:15:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
15 | for(i=0; i<3; i++){
| ^
main.c:15:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
15 | for(i=0; i<3; i++){
| ^~
main.c:18:1: error: expected identifier or '(' before 'return'
18 | return 0;
| ^~~~~~
main.c:19:1: error: expected identifier or '(' before '}' token
19 | }
| ^
|
s568566354
|
p00001
|
C
|
#include<stdio.h>
int i, j, dumy, a[10] = {1819,2003,876,2840,1723,
1673,3776,2848,1592,922};
for(i=0; i<10; i++){
for(j=i+1; j<10; j++){
if(a[i] < a[j]){
dumy=a[i];
a[i]=a[j];
a[j]=dumy;
}
}
}
for(i=0; i<3; i++){
printf("%d\n", a[i]);
}
return 0;
}
|
main.c:5:1: error: expected identifier or '(' before 'for'
5 | for(i=0; i<10; i++){
| ^~~
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
5 | for(i=0; i<10; i++){
| ^
main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
5 | for(i=0; i<10; i++){
| ^~
main.c:15:1: error: expected identifier or '(' before 'for'
15 | for(i=0; i<3; i++){
| ^~~
main.c:15:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
15 | for(i=0; i<3; i++){
| ^
main.c:15:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
15 | for(i=0; i<3; i++){
| ^~
main.c:18:1: error: expected identifier or '(' before 'return'
18 | return 0;
| ^~~~~~
main.c:19:1: error: expected identifier or '(' before '}' token
19 | }
| ^
|
s236979415
|
p00001
|
C
|
#include <stdio.h>
int main(){
int n[10];
int i;
int a;
for(i = 0; i < 10;i++){
scanf("%d",a[i]);
}
for(i = 0 ; i < 10; i++){
if(n[i] > n[i+1]){
a = n[i];
}else{
a = n[i+1];
}
}
printf("%d\n",a);
printf("%d\n",n[i+1]);
printf("%d\n",n[i+2]);
return 0;
}
|
main.c: In function 'main':
main.c:11:17: error: subscripted value is neither array nor pointer nor vector
11 | scanf("%d",a[i]);
| ^
|
s357271241
|
p00001
|
C
|
#include <stdio.h>
int main(){
int n[10];
int i;
int a;
for(i = 0; i < 10;i++){
scanf("%d",a[i]);
}
for(i = 0 ; i < 10; i++){
if(n[i] > n[i+1]){
a = n[i];
}else{
a = n[i+1];
}
}
printf("%d\n",a);
printf("%d\n",n[i+1]);
printf("%d\n",n[i+2]);
return 0;
}
|
main.c: In function 'main':
main.c:11:17: error: subscripted value is neither array nor pointer nor vector
11 | scanf("%d",a[i]);
| ^
|
s887644807
|
p00001
|
C
|
#include <stdio.h>
int main(void){
int high[10];
int i,max1=0,max2=0,max3=0;
for(i=0;i<10;i++){
scanf("%d",high[i]);
}
if(max3<high[i]){
if(max2<high[i]){
if(max<high[i]){
max3 = max2;
max2 = max;
max = high[i];
}
else{
max3 = max2;
max2 = high[i];
}
}
else{
max3 = high[i];
}
}
printf("%d\n%d\n%d\n",max,max2,max3);
return 0;
}
|
main.c: In function 'main':
main.c:13:22: error: 'max' undeclared (first use in this function); did you mean 'max3'?
13 | if(max<high[i]){
| ^~~
| max3
main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in
|
s836121276
|
p00001
|
C
|
#include<stdio.h>
#include<conio.h>
void qsort(int arr[9], int fst, int last);
int main()
{
int arr[9];
int i;
for (i = 0; i < 10; i++)
scanf("%d", &arr[i]);
qsort(arr, 0, 9);
for (i = 0; i < 3; i++)
printf("%d\n", arr[i]);
return 0;
}
void qsort(int arr[9], int fst, int last)
{
int i, j, pivot, tmp;
if (fst < last)
{
pivot = fst;
i = fst;
j = last;
while (i < j)
{
while (arr[i] >= arr[pivot] && i < last)
i++;
while (arr[j] < arr[pivot])
j--;
if (i < j)
{
tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
}
}
tmp = arr[pivot];
arr[pivot] = arr[j];
arr[j] = tmp;
qsort(arr, fst, j - 1);
qsort(arr, j + 1, last);
}
}
|
main.c:3:9: fatal error: conio.h: No such file or directory
3 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s035250591
|
p00001
|
C
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int a[10], i;
for(i=0; i<10; i++) cin>>a[i];
sort(a, a+10, std::greater<int>());
cout<<a[0]<<endl;
cout<<a[1]<<endl;
cout<<a[2]<<endl;
return 0;
}
|
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s637094039
|
p00001
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d,e,f,g,h,i,j;
int n1,n2,n3;
scanf("%d",&a);
scanf("%d",&b);
if(b > a){
n1 = b
n2 = a;
}else{
n1 = a;
n2 = b;
}
scanf("%d"&c);
if(c > n1){
n2 = n1;
n1 = c;
}else if(c > n2){
n3 = n2;
n2 = c;
}else{
n3 = c;
}
scanf("%d"&d);
if(d > n1){
n3 = n2;
n2 = n1;
n1 = d;
}else if(d > n2){
n3 = n2;
n2 = d;
}else if(d > n3){
n3 = d;
}
scanf("%d",&e);
if(e > n1){
n3 = n2;
n2 = n1;
n1 = e;
}else if(e > n2){
n3 = n2;
n2 = e;
}else if(e > n3){
n3 = e;
}
scanf("%d"&f);
if(f > n1){
n3 = n2;
n2 = n1;
n1 = f;
}else if(f > n2){
n3 = n2;
n2 = f;
}else if(f > n3){
n3 = f;
}
scanf("%d"&g);
if(g > n1){
n3 = n2;
n2 = n1;
n1 = g;
}else if(g > n2){
n3 = n2;
n2 = g;
}else if(g > n3){
n3 = g;
}
scanf("%d"&h);
if(h > n1){
n3 = n2;
n2 = n1;
n1 = h;
}else if(h > n2){
n3 = n2;
n2 = h;
}else if(h > n3){
n3 = h;
}
scanf("%d",&i);
if(i > n1){
n3 = n2;
n2 = n1;
n1 = i;
}else if(i > n2){
n3 = n2;
n2 = i;
}else if(i > n3){
n3 = i;
}
scanf("%d",&j);
if(j > n1){
n3 = n2;
n2 = n1;
n1 = j;
}else if(j > n2){
n3 = n2;
n2 = j;
}else if(j > n3){
n3 = j;
}
printf("%d\n",n1);
printf("%d\n",n2);
printf("%d\n",n3);
return 0;
}
|
main.c: In function 'main':
main.c:13:15: error: expected ';' before 'n2'
13 | n1 = b
| ^
| ;
14 | n2 = a;
| ~~
main.c:23:15: error: invalid operands to binary & (have 'char *' and 'int')
23 | scanf("%d"&c);
| ~~~~^
| |
| char *
main.c:41:15: error: invalid operands to binary & (have 'char *' and 'int')
41 | scanf("%d"&d);
| ~~~~^
| |
| char *
main.c:79:15: error: invalid operands to binary & (have 'char *' and 'int')
79 | scanf("%d"&f);
| ~~~~^
| |
| char *
main.c:98:15: error: invalid operands to binary & (have 'char *' and 'int')
98 | scanf("%d"&g);
| ~~~~^
| |
| char *
main.c:117:15: error: invalid operands to binary & (have 'char *' and 'int')
117 | scanf("%d"&h);
| ~~~~^
| |
| char *
|
s805593893
|
p00001
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d,e,f,g,h,i,j;
int n1,n2,n3;
scanf("%d",&a);
scanf("%d",&b);
if(b > a){
n1 = b
n2 = a;
}else{
n1 = a;
n2 = b;
}
scanf("%d"&c);
if(c > n1){
n2 = n1;
n1 = c;
}else if(c > n2){
n3 = n2;
n2 = c;
}else{
n3 = c;
}
scanf("%d"&d);
if(d > n1){
n3 = n2;
n2 = n1;
n1 = d;
}else if(d > n2){
n3 = n2;
n2 = d;
}else if(d > n3){
n3 = d;
}
scanf("%d",&e);
if(e > n1){
n3 = n2;
n2 = n1;
n1 = e;
}else if(e > n2){
n3 = n2;
n2 = e;
}else if(e > n3){
n3 = e;
}
scanf("%d"&f);
if(f > n1){
n3 = n2;
n2 = n1;
n1 = f;
}else if(f > n2){
n3 = n2;
n2 = f;
}else if(f > n3){
n3 = f;
}
scanf("%d"&g);
if(g > n1){
n3 = n2;
n2 = n1;
n1 = g;
}else if(g > n2){
n3 = n2;
n2 = g;
}else if(g > n3){
n3 = g;
}
scanf("%d"&h);
if(h > n1){
n3 = n2;
n2 = n1;
n1 = h;
}else if(h > n2){
n3 = n2;
n2 = h;
}else if(h > n3){
n3 = h;
}
scanf("%d",&i);
if(i > n1){
n3 = n2;
n2 = n1;
n1 = i;
}else if(i > n2){
n3 = n2;
n2 = i;
}else if(i > n3){
n3 = i;
}
scanf("%d",&j);
if(j > n1){
n3 = n2;
n2 = n1;
n1 = j;
}else if(j > n2){
n3 = n2;
n2 = j;
}else if(j > n3){
n3 = j;
}
printf("%d\n",n1);
printf("%d\n",n2);
printf("%d\n",n3);
return 0;
}
|
main.c: In function 'main':
main.c:13:15: error: expected ';' before 'n2'
13 | n1 = b
| ^
| ;
14 | n2 = a;
| ~~
main.c:23:15: error: invalid operands to binary & (have 'char *' and 'int')
23 | scanf("%d"&c);
| ~~~~^
| |
| char *
main.c:41:15: error: invalid operands to binary & (have 'char *' and 'int')
41 | scanf("%d"&d);
| ~~~~^
| |
| char *
main.c:79:15: error: invalid operands to binary & (have 'char *' and 'int')
79 | scanf("%d"&f);
| ~~~~^
| |
| char *
main.c:98:15: error: invalid operands to binary & (have 'char *' and 'int')
98 | scanf("%d"&g);
| ~~~~^
| |
| char *
main.c:117:15: error: invalid operands to binary & (have 'char *' and 'int')
117 | scanf("%d"&h);
| ~~~~^
| |
| char *
|
s510110351
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i, a[], temp;
int first=0, second=0, third=0;
for(i=0; i<10; i++) {
scanf("%d", &a[i]);
if(first < a[i]) {
third=second;
second=first;
first=a[i];
} else if(second < a[i]) {
third=second;
second=a[i];
} else if(third < a[i]) {
third=a[i];
}
}
printf("%d\n%d\n%d\n", first, second, third);
return 0;
}
|
main.c: In function 'main':
main.c:4:12: error: array size missing in 'a'
4 | int i, a[], temp;
| ^
|
s401448144
|
p00001
|
C
|
#include<stiod.h>
int main()
{
int a[10], max[3] = {0}, i, j;
for(i = 0; i < 10; i++){
scanf( "%d", a[i] );
for(j = 0; j < 3; j++){
if(max[j] < a[i]) {
max[j] = a[i];
break;
}
}
}
for(i = 0; i < 3; i++)
printf( "%d", max[i] );
return 0;
}
|
main.c:1:9: fatal error: stiod.h: No such file or directory
1 | #include<stiod.h>
| ^~~~~~~~~
compilation terminated.
|
s704298524
|
p00001
|
C
|
#include <stdio.h>
int main()
{
long int a[10];
long int m=0,n=0,k=0;
int i;
for(i=0;i<10;i++)
{
scanf("%ld",&a[i]);
if(a[i]>m)m=a[i];
}
for(i=0;i<10;i++)
if(a[i]>=n&&a[i]<=m)n=a[i];
for(i=0;i<10;i++)
if(a[i]>=k&&a[i]=<n)k=a[i];
printf("%ld\n%ld\n%ld",m,n,k);
return 0;
}
|
main.c: In function 'main':
main.c:15:26: error: expected expression before '<' token
15 | if(a[i]>=k&&a[i]=<n)k=a[i];
| ^
|
s140904815
|
p00001
|
C
|
#include <stdio.h>
int main(){
int hei[11],i,j,temp;
for(i=0;i<10;i++){
scanf("%d",hei);
}
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(hei[i]<hei[j]){
temp=hei[i];
hei[i]=hei[j];
hei[j]=temp;
}
}
}
for(i=0;i<2;i++){
printf("%d\n",hei[i])
}
return(0);
}
|
main.c: In function 'main':
main.c:19:30: error: expected ';' before '}' token
19 | printf("%d\n",hei[i])
| ^
| ;
20 | }
| ~
|
s788119291
|
p00001
|
C
|
#include <stdio.h>
int main(){
int hei[11],i,j,temp;
for(i=0;i<10;i++){
scanf("%d",&hei[i]);
}
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(hei[i]<hei[j]){
temp=hei[i];
hei[i]=hei[j];
hei[j]=temp;
}
}
}
for(i=0;i<2;i++){
printf("%d\n",hei[i])
}
return(0);
}
|
main.c: In function 'main':
main.c:19:30: error: expected ';' before '}' token
19 | printf("%d\n",hei[i])
| ^
| ;
20 | }
| ~
|
s959908774
|
p00001
|
C
|
#include <stdio.h>
int main(){
int hei[11],i,j,temp;
for(i=0;i<10;i++){
scanf("%d",&hei[i]);
}
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(hei[i]<hei[j]){
temp=hei[i];
hei[i]=hei[j];
hei[j]=temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",hei[i])
}
return(0);
}
|
main.c: In function 'main':
main.c:19:30: error: expected ';' before '}' token
19 | printf("%d\n",hei[i])
| ^
| ;
20 | }
| ~
|
s212942686
|
p00001
|
C
|
#include <stdio.h>
int main(){
int hei[10],i,j,temp;
for(i=0;i<10;i++){
scanf("%d",&hei[i]);
}
for(i=0;i<10;i++){
for(j=i+1;j<9;j++){
if(hei[i]<hei[j]){
temp=hei[i];
hei[i]=hei[j];
hei[j]=temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",hei[i])
}
return(0);
}
|
main.c: In function 'main':
main.c:19:30: error: expected ';' before '}' token
19 | printf("%d\n",hei[i])
| ^
| ;
20 | }
| ~
|
s508100918
|
p00001
|
C
|
#include <stdio.h>
int t[10];
int T[3];
int main(void){
int i,j,work;
for(i=0;i<10;i++){
scanf("%d",&t[i]);
}
for(i=0;i<3;++){
work=0;
T[i]=t[0];
for(j=1;j<10;j++){
if(T[i]<t[j]){
T[i]=t[j];
work=j;
}
}
t[work]=0;
}
printf("%d\n%d\n%d\n",T[0],T[1],T[2]);
return 0;
}
|
main.c: In function 'main':
main.c:9:17: error: expected expression before ')' token
9 | for(i=0;i<3;++){
| ^
|
s762496024
|
p00001
|
C
|
#include <stdio.h>
int t[10];
int T[3];
int main(void){
int i,j,work;
for(i=0;i<10;i++){
scanf("%d",&t[i]);
}
for(i=0;i<3;++){
work=0;
T[i]=t[0];
for(j=1;j<10;j++){
if(T[i]<t[j]){
T[i]=t[j];
work=j;
}
}
t[work]=0;
}
printf("%d\n%d\n%d\n",T[0],T[1],T[2]);
return 0;
}
|
main.c: In function 'main':
main.c:9:17: error: expected expression before ')' token
9 | for(i=0;i<3;++){
| ^
|
s344885762
|
p00001
|
C
|
#include <stdio.h>
int t[10];
int T[3];
int main(void){
int i,j,work;
for(i=0;i<10;i++){
scanf("%d",&t[i]);
}
for(i=0;i<3;++){
work=0;
T[i]=t[0];
for(j=1;j<10;j++){
if(T[i]<t[j]){
T[i]=t[j];
work=j;
}
}
t[work]=0;
}
printf("%d\n%d\n%d\n",T[0],T[1],T[2]);
return 0;
}
|
main.c: In function 'main':
main.c:9:17: error: expected expression before ')' token
9 | for(i=0;i<3;++){
| ^
|
s885959626
|
p00001
|
C
|
#include <stdio.h>
int main(void)
{
int i, j, hill[10], temp;
fo(i = 0; i < 10; i++)
scanf("%d"&hill[i]);
for (i = 0; i < 9; i++) {
for (j = i; j < 10; j++) {
if (hill[i] < hill[j]) {
temp = hill[i];
hill[i] = hill[j];
hill[j] = temp;
}
}
}
for (i = 0; i < 3; i++)
printf("%d", hill[i]);
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'fo'; did you mean 'feof'? [-Wimplicit-function-declaration]
6 | fo(i = 0; i < 10; i++)
| ^~
| feof
main.c:6:17: error: expected ')' before ';' token
6 | fo(i = 0; i < 10; i++)
| ~ ^
| )
main.c:6:31: error: expected ';' before 'scanf'
6 | fo(i = 0; i < 10; i++)
| ^
| ;
7 | scanf("%d"&hill[i]);
| ~~~~~
|
s588371675
|
p00001
|
C
|
int main()
{
int i;
int rank1 = 0, rank2 = 0, rank3 = 0;
int mountain[10] = {0};
for (i = 0; i < 10; i++) {
scanf_s("%d", &mountain[i]);
}
for (i = 0; i < 10; i++) {
if (mountain[i] > rank1)
{
rank1 = mountain[i]
}
else if (mountain[i] > rank2)
{
rank2 = mountain[i]
}
else if (mountain[i] > rank3)
{
rank3 = mountain[i];
}
}
printf("%d %d %d", rank1, rank2, rank3);
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
7 | scanf_s("%d", &mountain[i]);
| ^~~~~~~
main.c:13:44: error: expected ';' before '}' token
13 | rank1 = mountain[i]
| ^
| ;
14 | }
| ~
main.c:17:44: error: expected ';' before '}' token
17 | rank2 = mountain[i]
| ^
| ;
18 | }
| ~
main.c:26:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
26 | printf("%d %d %d", rank1, rank2, rank3);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | int main()
main.c:26:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
26 | printf("%d %d %d", rank1, rank2, rank3);
| ^~~~~~
main.c:26:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s155873882
|
p00001
|
C
|
int main()
{
int i,j;
int rank1 = 0;
int mountain[10] = {0};
for (i = 0; i < 10; i++) {
scanf_s("%d", &mountain[i]);
}
for (i = 0; i < 10; i++) {
for (j = i + 1; j < 10; j++) {
if (mountain[j] > mountain[i])
{
rank1 = mountain[i];
mountain[i] = mountain[j];
mountain[j] = rank1;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", mountain[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
7 | scanf_s("%d", &mountain[i]);
| ^~~~~~~
main.c:25:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
25 | printf("%d\n", mountain[i]);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | int main()
main.c:25:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
25 | printf("%d\n", mountain[i]);
| ^~~~~~
main.c:25:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s971727681
|
p00001
|
C
|
#include<stdio>
int main(){
int buf[10],i,j;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[i]
}
}
return 0;
}
|
main.c:1:9: fatal error: stdio: No such file or directory
1 | #include<stdio>
| ^~~~~~~
compilation terminated.
|
s878520082
|
p00001
|
C
|
#include<stdio>
int main(){
int buf[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[j]>buf[j+1]){
n=buf[j];
buf[j]=buf[j+1];
buf[j+1]=n;
}
}
}
printf("%d\n%d\n%d",buf[0],buf[1],buf[2]);
return 0;
}
|
main.c:1:9: fatal error: stdio: No such file or directory
1 | #include<stdio>
| ^~~~~~~
compilation terminated.
|
s142300535
|
p00001
|
C
|
#include<stdio.h>
int main(){
/*
int buf[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
*/
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[j]>buf[j+1]){
n=buf[j];
buf[j]=buf[j+1];
buf[j+1]=n;
}
}
}
buf[0]=1;
printf("%d\n%d\n%d\n",buf[0],buf[1],buf[2]);
return 0;
}
|
main.c: In function 'main':
main.c:15:5: error: 'i' undeclared (first use in this function)
15 | for(i=0;i<9;i++){
| ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:5: error: 'j' undeclared (first use in this function)
16 | for(j=0;j<9-i;j++){
| ^
main.c:18:4: error: 'buf' undeclared (first use in this function)
18 | if(buf[j]>buf[j+1]){
| ^~~
main.c:19:1: error: 'n' undeclared (first use in this function)
19 | n=buf[j];
| ^
|
s373481865
|
p00001
|
C
|
int main(void) {
int i,h;
int height[3];
for(i=0; scanf("%d",&h) != EOF; i++) {
if(h >= height[0]) h = height[0];
else if(h >= height[1]) h = height[1];
else if(h >= height[2]) h = height[2];
}
for(i=0; i<3; i++) printf("%d", height[i]);
return 0;
}
|
main.c: In function 'main':
main.c:5:18: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | for(i=0; scanf("%d",&h) != EOF; i++) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void) {
main.c:5:18: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | for(i=0; scanf("%d",&h) != EOF; i++) {
| ^~~~~
main.c:5:18: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:36: error: 'EOF' undeclared (first use in this function)
5 | for(i=0; scanf("%d",&h) != EOF; i++) {
| ^~~
main.c:5:36: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:5:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:28: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
11 | for(i=0; i<3; i++) printf("%d", height[i]);
| ^~~~~~
main.c:11:28: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:28: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:28: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s839792579
|
p00001
|
C
|
#include<stdio.h>
int main(){
int buf[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[j]<buf[j+1]){
bn=uf[j];
buf[j]=buf[j+1];
buf[j+1]=n;
}
}
}
printf("%d\n",buf[0);
printf("%d\n",buf[1);
printf("%d\n",buf[2);
return 0;
}
|
main.c: In function 'main':
main.c:15:1: error: 'bn' undeclared (first use in this function); did you mean 'n'?
15 | bn=uf[j];
| ^~
| n
main.c:15:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:4: error: 'uf' undeclared (first use in this function); did you mean 'buf'?
15 | bn=uf[j];
| ^~
| buf
main.c:24:20: error: expected ']' before ')' token
24 | printf("%d\n",buf[0);
| ^
| ]
main.c:25:20: error: expected ']' before ')' token
25 | printf("%d\n",buf[1);
| ^
| ]
main.c:26:20: error: expected ']' before ')' token
26 | printf("%d\n",buf[2);
| ^
| ]
|
s002665360
|
p00001
|
C
|
#include<stdio.h>
int main(){
int buf[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[j]<buf[j+1]){
n=uf[j];
buf[j]=buf[j+1];
buf[j+1]=n;
}
}
}
printf("%d\n",buf[0);
printf("%d\n",buf[1);
printf("%d\n",buf[2);
return 0;
}
|
main.c: In function 'main':
main.c:15:3: error: 'uf' undeclared (first use in this function); did you mean 'buf'?
15 | n=uf[j];
| ^~
| buf
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:20: error: expected ']' before ')' token
24 | printf("%d\n",buf[0);
| ^
| ]
main.c:25:20: error: expected ']' before ')' token
25 | printf("%d\n",buf[1);
| ^
| ]
main.c:26:20: error: expected ']' before ')' token
26 | printf("%d\n",buf[2);
| ^
| ]
|
s863473499
|
p00001
|
C
|
#include<stdio.h>
int main(){
int buf[10],i,j,n;
for(i=0;i<10;i++){
scanf("%d",&buf[i]);
}
for(i=0;i<9;i++){
for(j=0;j<9-i;j++){
if(buf[j]<buf[j+1]){
n=buf[j];
buf[j]=buf[j+1];
buf[j+1]=n;
}
}
}
printf("%d\n",buf[0);
printf("%d\n",buf[1);
printf("%d\n",buf[2);
return 0;
}
|
main.c: In function 'main':
main.c:24:20: error: expected ']' before ')' token
24 | printf("%d\n",buf[0);
| ^
| ]
main.c:25:20: error: expected ']' before ')' token
25 | printf("%d\n",buf[1);
| ^
| ]
main.c:26:20: error: expected ']' before ')' token
26 | printf("%d\n",buf[2);
| ^
| ]
|
s846045292
|
p00001
|
C
|
#include<stdio.h>
int main(void){
int i,j,tmp;
int high[10];
for(i=0;i<10;i++){
scanf("%d",&high[i]);
}
for(i=0;i<10;i++){
for(j=0;j<10;j++){
if(high[i]<high[j]){
tmp=high[i];
high[i]=high[j];
high[j]=tmp;
}
}
for(i=0;i<3;i++){
printf("%d\n",high[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s006364755
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int a,b,max= 0,max2=0,max3=0;
for(a 1;a<=10;a++){
scanf("%d",&b);
if(b>max) {
max=b;
}
else if(b>max2){
max2=b;
}
else if(b>max3){
max3=b;
}
}
printf("%d\n %d\n %d\n",max,max2,max3);
return 0;
}
|
main.c: In function 'main':
main.c:5:14: error: expected ';' before numeric constant
5 | for(a 1;a<=10;a++){
| ^~
| ;
|
s105411637
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int a,b,max=0,max2=0,max3=0;
for(a=1;a<=10;a++){
scanf("%d",&a);
if(b>max){[
max=b;
}
else if(b>max2){
max2=b;
}
else if(b>max3){
max3=b;
}
}
printf("%d\n %d\n %d\n",max,max2,max3);
return 0;
}
|
main.c: In function 'main':
main.c:7:21: error: expected expression before '[' token
7 | if(b>max){[
| ^
main.c:8:22: error: expected ';' before '}' token
8 | max=b;
| ^
| ;
9 | }
| ~
|
s500930533
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int a,b,max=0,max2=0,max3=0;
for(a=1;a<=10;a++){
scanf("%d",&a);
if(b>max){
???max=b;
}
else if(b>max2){
?????????max2=b;
}
else if(b>max3){
?????????max3=b;
}
}
printf("%d\n %d\n %d\n",max,max2,max3);
return 0;
}
|
main.c: In function 'main':
main.c:8:16: error: expected expression before '?' token
8 | ???max=b;
| ^
main.c:11:11: error: expected expression before '?' token
11 | ?????????max2=b;
| ^
main.c:14:11: error: expected expression before '?' token
14 | ?????????max3=b;
| ^
|
s684757359
|
p00001
|
C
|
using System;
class AOJ{
public static void Main(string[] args)
{
int[] n = new int[10];
for(int i=0; i<10; i++)
n[i] = int.Parse(str[i]);
Array.Sort(n);
for(int i=0; i<3; i++)
Console.WriteLine(n[9-i]);
}
}
|
main.c:1:1: error: unknown type name 'using'
1 | using System;
| ^~~~~
main.c:3:1: error: unknown type name 'class'
3 | class AOJ{
| ^~~~~
main.c:3:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
3 | class AOJ{
| ^
|
s535904327
|
p00001
|
C
|
#include<stdio.h>
int main(){
int t[10],i,j,tmp;
for(i=0;i<=9;i++)
scanf("%d",&t[i]);
for (i = 0; i < 8; i++) {
for (j = 8; j > i; j--) {
if (t[j - 1] > t[j]) {
temp = t[j];
t[j] = t[j - 1];
t[j - 1]= temp;
}
}
}
for(i=0;i<=3;i++)
printf("%d\n",t[i]);
return 0;
}
|
main.c: In function 'main':
main.c:14:17: error: 'temp' undeclared (first use in this function); did you mean 'tmp'?
14 | temp = t[j];
| ^~~~
| tmp
main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
|
s382712629
|
p00001
|
C
|
#include<stdio.h>
int main(){
int t[10],i,j,tmp;
for(i=0;i<=9;i++)
scanf("%d",&t[i]);
for (i = 0; i < 8; i++) {
for (j = 8; j > i; j--) {
if (t[j - 1] > t[j]) {
tmp = t[j];
t[j] = t[j - 1];
t[j - 1]= temp;
}
}
}
for(i=0;i<=3;i++)
printf("%d\n",t[i]);
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: 'temp' undeclared (first use in this function); did you mean 'tmp'?
16 | t[j - 1]= temp;
| ^~~~
| tmp
main.c:16:27: note: each undeclared identifier is reported only once for each function it appears in
|
s700112650
|
p00001
|
C
|
#include <stdio.h>
void ShowData(int x[], int n);
void Swap(int x[], int i, int j);
void QSort(int x[], int left, int right);
void Input(int x[], int n);
int main()
{
int hight[10] = {0};
int i;
Input(hight, 10);
QSort(hight, 0, 9);
for (i = 9; i >= 7; i--) {
printf("%d\n", hight[i]);
}
return 0;
}
// ?????????????????¨???
void ShowData(int x[], int n)
{
int i;
for (i = 0; i < n; i++) {
printf("%d ", x[i]);
}
printf("\n");
}
// ?????????????´??????????
void Swap(int x[], int i, int j)
{
int temp;
temp = x[i];
x[i] = x[j];
x[j] = temp;
}
// ?????????????????????
void QSort(int x[], int left, int right)
{
int i, j;
int pivot;
i = left;
j = right;
pivot = x[(left + right) / 2];
while (1) {
while (x[i] < pivot) {
i++;
}
while (x[j] > pivot) {
j--;
}
if (i >= j) {
break;
}
Swap(x, i, j);
i++;
j--;
}
if (left < i - 1) /* ?????????????????? 2 ??\???????´????????????° */
QSort(x, left, i - 1); /* ??????????????? Q ??????????????? */
if (j + 1 < right) /* ?????????????????? 2 ??\???????´????????????° */
QSort(x, j + 1, right); /* ??????????????? Q ??????????????? */
}
// ??\???
void Input(int x[], int n)
{
int i;
for (i = 0; i < n; i++) {
scanf_s("%d", &x[i]);
}
}
|
main.c: In function 'Input':
main.c:79:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
79 | scanf_s("%d", &x[i]);
| ^~~~~~~
| scanf
|
s635036725
|
p00001
|
C
|
int main(void){
int i,j,max[3],dummy;
for(i=0;i<10;i++){
scanf("%d",&n);
for(j=0;j<3;j++){
if(n>max[j]){
dummy=max[j];
max[j]=n;
n=dummy;
}
}
}
for(i=0;i<3i++){
printf("%d",max[j]);
}
}
|
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | scanf("%d",&n);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void){
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | scanf("%d",&n);
| ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:15: error: 'n' undeclared (first use in this function)
7 | scanf("%d",&n);
| ^
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:13: error: lvalue required as increment operand
18 | for(i=0;i<3i++){
| ^~
main.c:18:15: error: expected ';' before ')' token
18 | for(i=0;i<3i++){
| ^
| ;
main.c:19:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
19 | printf("%d",max[j]);
| ^~~~~~
main.c:19:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:1: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s584933907
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int height[10];
for(i=0;i<=9;i++)
scanf("%d",&height[i]);
for(i=0;i<=9;i++){
int nam;
for(j=1;j<=9;j++){
if(height[i]<=height[j]){
num=height[i];
height[i]=height[j];
heigth[j]=num;
}
}
}
for(i=0;i<=2;i++)
printf("%d\n",height[i]);
return 0;
}
|
main.c: In function 'main':
main.c:12:33: error: 'num' undeclared (first use in this function); did you mean 'nam'?
12 | num=height[i];
| ^~~
| nam
main.c:12:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:33: error: 'heigth' undeclared (first use in this function); did you mean 'height'?
14 | heigth[j]=num;
| ^~~~~~
| height
|
s560322659
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int height[10];
for(i=0;i<=9;i++)
scanf("%d",&height[i]);
for(i=0;i<=9;i++){
int num;
for(j=1;j<=9;j++){
if(height[i]<=height[j]){
num=height[i];
height[i]=height[j];
heigth[j]=num;
}
}
}
for(i=0;i<=2;i++)
printf("%d\n",height[i]);
return 0;
}
|
main.c: In function 'main':
main.c:14:33: error: 'heigth' undeclared (first use in this function); did you mean 'height'?
14 | heigth[j]=num;
| ^~~~~~
| height
main.c:14:33: note: each undeclared identifier is reported only once for each function it appears in
|
s770118573
|
p00001
|
C
|
#include<stdio.h>
int main()
{
printf("hieght of muntain 1\n");
printf("hieght of montain 2\n");
printf("hieght of mountain 3\n);
return 0;
}
|
main.c: In function 'main':
main.c:6:8: warning: missing terminating " character
6 | printf("hieght of mountain 3\n);
| ^
main.c:6:8: error: missing terminating " character
6 | printf("hieght of mountain 3\n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
main.c:8:1: error: expected expression before 'return'
8 | return 0;
| ^~~~~~
main.c:8:10: error: expected ';' before '}' token
8 | return 0;
| ^
| ;
9 | }
| ~
|
s535236452
|
p00001
|
C
|
# include <iostream>
# include <algorithm>
using namespace std;
int main()
{
int h[10];
for(int i=0;i<10;i++)
{
cin >> h[i];
}
sort(h,h+10);
reverse(h,h+10);
for(int i=0;i<3;i++)
{
cout << h[i] << endl;
}
return 0;
}
|
main.c:1:11: fatal error: iostream: No such file or directory
1 | # include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s847345554
|
p00001
|
C
|
#include<stdio.h>
int main(void){
int i,j,exc;
int Yama[10],Rank[];
for(i=0;i<=9;i++){
scanf("%d",&Yama[i]);
}
for(i=0;i<=8;i++){
for(j=i+1;j<=9;j++){
if(Yama[i]<Yama[j]){
exc=Yama[i];
Yama[i]=Yama[j];
Yama[j]=exc;
}
}
}
for(i=0;i<=2;i++){
printf("%d\n",Yama[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:22: error: array size missing in 'Rank'
5 | int Yama[10],Rank[];
| ^~~~
|
s062293484
|
p00001
|
C
|
#include<stdio.h>
#define DATE 10
int main() {
int i,date[DATE],top[3]={0,0,0};
for(i=0;i<DATE;i++){
scanf("%d",&date[i]);
}
for(i=0;i<DATE;i++){
if(date[i]>=top[0]){
top[2]=top[1];
top[1]=top[0];
top[0]=date[i];
} else if(dtae[i]>=top[1]){
top[2]=top[1];
top[1]=date[i];
} else if(date[i]>=top[2]){
top[2]=date[i];
}
}
printf("%d\n%d\n%d\n",top[0],top[1],top[2]);
return 0;
}
|
main.c: In function 'main':
main.c:16:11: error: 'dtae' undeclared (first use in this function); did you mean 'date'?
16 | } else if(dtae[i]>=top[1]){
| ^~~~
| date
main.c:16:11: note: each undeclared identifier is reported only once for each function it appears in
|
s520475280
|
p00001
|
C
|
include <stdio.h>
#include <stdlib.h>
#define NUM 10
int comp(const void *, const void *);
int comp(const void *x, const void *y) {
return *(const int *)x - *(const int *)y;
}
int main(int argc, char *argv[]) {
int i = 0;
int Mt[NUM] = {0};
for(i=0; i<NUM; i++) {
fscanf(stdin, "%d", &Mt[i]);
}
qsort(Mt, NUM, sizeof(int *), comp);
for(i=NUM; i>0; i--) {
fprintf(stdout, "%d\n", Mt[i-1]);
}
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
In file included from main.c:2:
/usr/include/stdlib.h:98:8: error: unknown type name 'size_t'
98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
| ^~~~~~
/usr/include/stdlib.h:57:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
56 | #include <bits/floatn.h>
+++ |+#include <stddef.h>
57 |
/usr/include/stdlib.h:531:25: error: unknown type name 'size_t'
531 | size_t __statelen) __THROW __nonnull ((2));
| ^~~~~~
/usr/include/stdlib.h:531:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:561:25: error: unknown type name 'size_t'
561 | size_t __statelen,
| ^~~~~~
/usr/include/stdlib.h:561:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:661:42: error: unknown type name 'size_t'
661 | extern void arc4random_buf (void *__buf, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:661:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:672:22: error: unknown type name 'size_t'
672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
| ^~~~~~
/usr/include/stdlib.h:672:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:22: error: unknown type name 'size_t'
675 | extern void *calloc (size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:675:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:38: error: unknown type name 'size_t'
675 | extern void *calloc (size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:675:38: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:683:36: error: unknown type name 'size_t'
683 | extern void *realloc (void *__ptr, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:683:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:41: error: unknown type name 'size_t'
695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:695:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:57: error: unknown type name 'size_t'
695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:695:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:41: error: unknown type name 'size_t'
701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:701:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:57: error: unknown type name 'size_t'
701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:701:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/stdlib.h:706:
/usr/include/alloca.h:32:22: error: unknown type name 'size_t'
32 | extern void *alloca (size_t __size) __THROW;
| ^~~~~~
/usr/include/alloca.h:25:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
24 | #include <stddef.h>
+++ |+#include <stddef.h>
25 |
/usr/include/stdlib.h:712:22: error: unknown type name 'size_t'
712 | extern void *valloc (size_t __size) __THROW __attribute_malloc__
| ^~~~~~
/usr/include/stdlib.h:712:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:45: error: unknown type name 'size_t'
718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:718:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:65: error: unknown type name 'size_t'
718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:718:65: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:29: error: unknown type name 'size_t'
724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:724:29: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:49: error: unknown type name 'size_t'
724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:724:49: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:23: error: unknown type name 'size_t'
961 | size_t __nmemb, size_t __size, __compar_fn_t __compar)
| ^~~~~~
/usr/include/stdlib.h:961:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:39: error: unknown type name 'size_t'
961 | size_t __nmemb, size_t __size, __compar_fn_t __compar)
| ^~~~~~
/usr/include/stdlib.h:961:39: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:34: error: unknown type name 'size_t'
970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
| ^~~~~~
/usr/include/stdlib.h:970:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:50: error: unknown type name 'size_t'
970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
| ^~~~~~
/usr/include/stdlib.h:970:50: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1044:20: error: unknown type name 'size_t'
1044 | size_t __len) __THROW __nonnull ((3, 4, 5));
| ^~~~~~
/usr/include/stdlib.h:1044:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1047:20: error: unknown type name 'size_t'
1047 | size_t __len) __THROW __nonnull ((3, 4, 5));
| ^~~~~~
/usr/include/stdlib.h:1047:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1051:45: error: unknown type name 'size_t'
1051 | char *__restrict __buf, size_t __len)
| ^~~~~~
/usr/include/stdlib.h:1051:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1055:45: error: unknown type name 'size_t'
1055 | char *__restrict __buf, size_t __len)
| ^~~~~~
/usr/include/stdlib.h:1055:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1062:36: error: unknown type name 'size_t'
1062 | extern int mblen (const char *__s, size_t __n) __THROW;
| ^~~~~~
/usr/include/stdlib.h:1062:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1066:48: error: unknown type name 'size_t'
1066 | const char *__restrict __s, size_t __n) __THROW;
| ^~~~~~
/usr/include/stdlib.h:1066:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1073:8: error: unknown type name 'size_t'
1073 | extern size_t mbstowcs (wchar_t *__restrict __pwcs,
| ^~~~~~
/usr/include/stdlib.h:1073:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1074:53: error: unknown type name 'size_t'
1074 | const char *__restrict __s, size_t __n) __THROW
| ^~~~~~
/usr/include/stdlib.h:1074:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1077:8: error: unknown type name 'size_t'
1077 | extern size_t wcstombs (char *__restrict __s,
| ^~~~~~
/usr/include/stdlib.h:1077:8: note: 'size_t' is defined in header '<stddef.h>'; this is probab
|
s516805539
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int m1, m2, m3, a ,i;
m1=m2=m3=0;
for(i=1; i<11; i++){
printf("?±±?????????%d???",i);
scanf("%d", &a);
if(m1<a){
m3=m2;
m2=m1;
m1=a;
}else if(m2<a){
m3=m2;
m2=a;
}else if(m3<a){
m3=a;
}
}
}
}
printf("%d\n%d\n%d\n", m1,m2,m3);
return 0;
}
|
main.c:21:9: error: expected identifier or '(' before '}' token
21 | }
| ^
main.c:22:16: error: expected declaration specifiers or '...' before string constant
22 | printf("%d\n%d\n%d\n", m1,m2,m3);
| ^~~~~~~~~~~~~~
main.c:22:32: error: unknown type name 'm1'
22 | printf("%d\n%d\n%d\n", m1,m2,m3);
| ^~
main.c:22:35: error: unknown type name 'm2'
22 | printf("%d\n%d\n%d\n", m1,m2,m3);
| ^~
main.c:22:38: error: unknown type name 'm3'
22 | printf("%d\n%d\n%d\n", m1,m2,m3);
| ^~
main.c:23:9: error: expected identifier or '(' before 'return'
23 | return 0;
| ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
24 | }
| ^
|
s235095930
|
p00001
|
C
|
#include <stdio.h>
int main(void) {
int i j;
double max,x[10];
for(j=0;j<10;j++);{
scanf("%lf",&x[j]);
}
for(i=1;i<10;i++){
for(j=i+1;j<10;j++){
if(x[i]<x[j]){
a=x[i];
x[i]=x[j];
x[j]=a;
}
}
}
for(i=1;i<4;i++){
printf("%d",x{i});
}
return 0;
}
|
main.c: In function 'main':
main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'j'
3 | int i j;
| ^
main.c:3:15: error: 'j' undeclared (first use in this function)
main.c:3:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:13: error: 'i' undeclared (first use in this function)
8 | for(i=1;i<10;i++){
| ^
main.c:11:33: error: 'a' undeclared (first use in this function)
11 | a=x[i];
| ^
main.c:18:22: error: expected ')' before '{' token
18 | printf("%d",x{i});
| ~ ^
| )
|
s291666532
|
p00001
|
C
|
#include <stdio.h>
int main(void) {
int i j;
double max,x[10];
for(j=0;j<10;j++);{
scanf("%lf",&x[j]);
}
for(i=1;i<10;i++){
for(j=i+1;j<10;j++){
if(x[i]<x[j]){
a=x[i];
x[i]=x[j];
x[j]=a;
}
}
}
for(i=1;i<4;i++){
printf("%d\n",x{i});
}
return 0;
}
|
main.c: In function 'main':
main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'j'
3 | int i j;
| ^
main.c:3:15: error: 'j' undeclared (first use in this function)
main.c:3:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:13: error: 'i' undeclared (first use in this function)
8 | for(i=1;i<10;i++){
| ^
main.c:11:33: error: 'a' undeclared (first use in this function)
11 | a=x[i];
| ^
main.c:18:24: error: expected ')' before '{' token
18 | printf("%d\n",x{i});
| ~ ^
| )
|
s601822066
|
p00001
|
C
|
#include<stdio.h>
int main(void){
int a,b;
a=1;
for(b = 1; b <= 9 ; b++){
printf("%d x %d = %d\n", a, b, a*b);
}
a=2;
for(b = 1; b <= 9 ; b++){
printf("%d x %d = %d\n", a, b, a*b);
}
a=3;
for(b = 1; b <= 9 ; b++){
printf("%d x %d = %d\n", a, b, a*b);
|
main.c: In function 'main':
main.c:14:17: error: expected declaration or statement at end of input
14 | printf("%d x %d = %d\n", a, b, a*b);
| ^~~~~~
main.c:14:17: error: expected declaration or statement at end of input
|
s066426506
|
p00001
|
C
|
#include<stdio.h>
int main (void){
int d, m1, m2, m3, i;
for(i=0;i<10;i++){
scanf("%d",&d);
if(d>m1){
m3=m2;
m2=m1;
m1=d;
} else if(d>m2){
m3=m2;
m2=d;
} else if(d>m3){
m3=d;
}
printf("%d\n%d\n%d\n" m1, m2, m3);
retrun 0;
}
|
main.c: In function 'main':
main.c:16:26: error: expected ')' before 'm1'
16 | printf("%d\n%d\n%d\n" m1, m2, m3);
| ~ ^~~
| )
main.c:17:5: error: 'retrun' undeclared (first use in this function)
17 | retrun 0;
| ^~~~~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:11: error: expected ';' before numeric constant
17 | retrun 0;
| ^~
| ;
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s482185455
|
p00001
|
C
|
#include <stdio.h>
int main(){
int n1,n2,n3,
b,c,d,e,f,g,h,i,l;
scanf(%d,&n1);
scanf(%d,&b);
if(n1<b){
n1=n2;
b=n1;
}
else{
b=n2;
}
scanf(%d,&c);
if(n1<c){
n2=n3;
n1=n2;
c=n1;
}
else if(n2<c){
n2=n3;
c=n2;
}
else{
c=n3;
}
scanf(%d,&d);
if(n1<d){
n2=n3;
n1=n2;
d=n1;
}
else if(n2<d){
n2=n3;
d=n2;
}
else if(n3<d){
d=n3;
}
scanf(%d,&e);
if(n1<e){
n2=n3;
n1=n2;
e=n1;
}
else if(n2<e){
n2=n3;
e=n2;
}
else if(n3<e){
e=n3;
}
scanf(%d,&f);
if(n1<f){
n2=n3;
n1=n2;
f=n1;
}
else if(n2<f){
n2=n3;
f=n2;
}
else if(n3<f){
f=n3;
}
scanf(%d,&g);
if(n1<g){
n2=n3;
n1=n2;
g=n1;
}
else if(n2<g){
n2=n3;
g=n2;
}
else if(n3<g){
g=n3;
}
scanf(%d,&h);
if(n1<h){
n2=n3;
n1=n2;
h=n1;
}
else if(n2<h){
n2=n3;
h=n2;
}
else if(n3<h){
h=n3;
}
scanf(%d,&i);
if(n1<i){
n2=n3;
n1=n2;
i=n1;
}
else if(n2<i){
n2=n3;
i=n2;
}
else if(n3<i){
i=n3;
}
scanf(%d,&j);
if(n1<j){
n2=n3;
n1=n2;
j=n1;
}
else if(n2<j){
n2=n3;
j=n2;
}
else if(n3<j){
j=n3;
}
printf(%d,n1);
printf(%d,n2)
printf(%d,n3)
return 0;}
|
main.c: In function 'main':
main.c:9:7: error: expected expression before '%' token
9 | scanf(%d,&n1);
| ^
main.c:10:7: error: expected expression before '%' token
10 | scanf(%d,&b);
| ^
main.c:21:7: error: expected expression before '%' token
21 | scanf(%d,&c);
| ^
main.c:36:7: error: expected expression before '%' token
36 | scanf(%d,&d);
| ^
main.c:52:7: error: expected expression before '%' token
52 | scanf(%d,&e);
| ^
main.c:69:7: error: expected expression before '%' token
69 | scanf(%d,&f);
| ^
main.c:83:7: error: expected expression before '%' token
83 | scanf(%d,&g);
| ^
main.c:97:7: error: expected expression before '%' token
97 | scanf(%d,&h);
| ^
main.c:112:7: error: expected expression before '%' token
112 | scanf(%d,&i);
| ^
main.c:126:7: error: expected expression before '%' token
126 | scanf(%d,&j);
| ^
main.c:127:7: error: 'j' undeclared (first use in this function)
127 | if(n1<j){
| ^
main.c:127:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:143:8: error: expected expression before '%' token
143 | printf(%d,n1);
| ^
main.c:144:8: error: expected expression before '%' token
144 | printf(%d,n2)
| ^
main.c:144:14: error: expected ';' before 'printf'
144 | printf(%d,n2)
| ^
| ;
145 | printf(%d,n3)
| ~~~~~~
|
s693982015
|
p00001
|
C
|
#include <stdio.h>
int main(){
int n1,n2,n3,
b,c,d,e,f,g,h,i,l;
scanf("%d",&n1);
scanf("%d",&b);
if(n1<b){
n1=n2;
b=n1;
}
else{
b=n2;
}
scanf("%d",&c);
if(n1<c){
n2=n3;
n1=n2;
c=n1;
}
else if(n2<c){
n2=n3;
c=n2;
}
else{
c=n3;
}
scanf("%d",&d);
if(n1<d){
n2=n3;
n1=n2;
d=n1;
}
else if(n2<d){
n2=n3;
d=n2;
}
else if(n3<d){
d=n3;
}
scanf("%d",&e);
if(n1<e){
n2=n3;
n1=n2;
e=n1;
}
else if(n2<e){
n2=n3;
e=n2;
}
else if(n3<e){
e=n3;
}
scanf("%d",&f);
if(n1<f){
n2=n3;
n1=n2;
f=n1;
}
else if(n2<f){
n2=n3;
f=n2;
}
else if(n3<f){
f=n3;
}
scanf("%d",&g);
if(n1<g){
n2=n3;
n1=n2;
g=n1;
}
else if(n2<g){
n2=n3;
g=n2;
}
else if(n3<g){
g=n3;
}
scanf("%d",&h);
if(n1<h){
n2=n3;
n1=n2;
h=n1;
}
else if(n2<h){
n2=n3;
h=n2;
}
else if(n3<h){
h=n3;
}
scanf("%d",&i);
if(n1<i){
n2=n3;
n1=n2;
i=n1;
}
else if(n2<i){
n2=n3;
i=n2;
}
else if(n3<i){
i=n3;
}
scanf("%d",&j);
if(n1<j){
n2=n3;
n1=n2;
j=n1;
}
else if(n2<j){
n2=n3;
j=n2;
}
else if(n3<j){
j=n3;
}
printf("%d",n1);
printf("%d",n2);
printf("%d",n3);
return 0;}
|
main.c: In function 'main':
main.c:126:13: error: 'j' undeclared (first use in this function)
126 | scanf("%d",&j);
| ^
main.c:126:13: note: each undeclared identifier is reported only once for each function it appears in
|
s995317989
|
p00001
|
C
|
#include <stdio.h>
int main(){
int n1,n2,n3,
b,c,d,e,f,g,h,i,l;
scanf(%d,&n1);
scanf(%d,&b);
if(n1<b){
n1=n2;
b=n1;
}
else{
b=n2;
}
scanf(%d,&c);
if(n1<c){
n2=n3;
n1=n2;
c=n1;
}
else if(n2<c){
n2=n3;
c=n2;
}
else{
c=n3;
}
scanf(%d,&d);
if(n1<d){
n2=n3;
n1=n2;
d=n1;
}
else if(n2<d){
n2=n3;
d=n2;
}
else if(n3<d){
d=n3;
}
scanf(%d,&e);
if(n1<e){
n2=n3;
n1=n2;
e=n1;
}
else if(n2<e){
n2=n3;
e=n2;
}
else if(n3<e){
e=n3;
}
scanf(%d,&f);
if(n1<f){
n2=n3;
n1=n2;
f=n1;
}
else if(n2<f){
n2=n3;
f=n2;
}
else if(n3<f){
f=n3;
}
scanf(%d,&g);
if(n1<g){
n2=n3;
n1=n2;
g=n1;
}
else if(n2<g){
n2=n3;
g=n2;
}
else if(n3<g){
g=n3;
}
scanf(%d,&h);
if(n1<h){
n2=n3;
n1=n2;
h=n1;
}
else if(n2<h){
n2=n3;
h=n2;
}
else if(n3<h){
h=n3;
}
scanf(%d,&i);
if(n1<i){
n2=n3;
n1=n2;
i=n1;
}
else if(n2<i){
n2=n3;
i=n2;
}
else if(n3<i){
i=n3;
}
scanf(%d,&j);
if(n1<j){
n2=n3;
n1=n2;
j=n1;
}
else if(n2<j){
n2=n3;
j=n2;
}
else if(n3<j){
j=n3;
}
printf(%d,n1);
printf(%d,n2)
printf(%d,n3)
return 0;}
|
main.c: In function 'main':
main.c:9:7: error: expected expression before '%' token
9 | scanf(%d,&n1);
| ^
main.c:10:7: error: expected expression before '%' token
10 | scanf(%d,&b);
| ^
main.c:21:7: error: expected expression before '%' token
21 | scanf(%d,&c);
| ^
main.c:36:7: error: expected expression before '%' token
36 | scanf(%d,&d);
| ^
main.c:52:7: error: expected expression before '%' token
52 | scanf(%d,&e);
| ^
main.c:69:7: error: expected expression before '%' token
69 | scanf(%d,&f);
| ^
main.c:83:7: error: expected expression before '%' token
83 | scanf(%d,&g);
| ^
main.c:97:7: error: expected expression before '%' token
97 | scanf(%d,&h);
| ^
main.c:112:7: error: expected expression before '%' token
112 | scanf(%d,&i);
| ^
main.c:126:7: error: expected expression before '%' token
126 | scanf(%d,&j);
| ^
main.c:127:7: error: 'j' undeclared (first use in this function)
127 | if(n1<j){
| ^
main.c:127:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:143:8: error: expected expression before '%' token
143 | printf(%d,n1);
| ^
main.c:144:8: error: expected expression before '%' token
144 | printf(%d,n2)
| ^
main.c:144:14: error: expected ';' before 'printf'
144 | printf(%d,n2)
| ^
| ;
145 | printf(%d,n3)
| ~~~~~~
|
s137170466
|
p00001
|
C
|
#include<stdio.h>
int main(void){
int m[4],id;
m[1]=0;
for(i=0;i<10;i++){
scanf("%d",&d);
if(d>m[1]){
m[3]=m[2];
m[2]=m[1];
m[1]=d;
}else if(d>m[3]){
m[3]=m{2];
m[2]=d;
}else if(d>m[3]){
m[3]=d;
}
}
printf("%d\n %d\n %d\n",m[1],m[2],m[3]);
return 0;
|
main.c: In function 'main':
main.c:5:13: error: 'i' undeclared (first use in this function); did you mean 'id'?
5 | for(i=0;i<10;i++){
| ^
| id
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:25: error: 'd' undeclared (first use in this function); did you mean 'id'?
6 | scanf("%d",&d);
| ^
| id
main.c:12:16: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
12 | m[3]=m{2];
| ^
main.c:12:18: error: expected ';' before '{' token
12 | m[3]=m{2];
| ^
| ;
main.c:20:9: error: expected declaration or statement at end of input
20 | return 0;
| ^~~~~~
|
s837761849
|
p00001
|
C
|
#include <stdio.h>
????????????
int main() {
????????int data = 0;
????????int bakData = 0;
????????int first = 0;
????????int second = 0;
????????int third = 0;
????????
????????int i;
????????for(i = 0; i<10; i++) {
??????????????????????scanf("%d", &data);
??????????????????????if(bakData < data) {
??????????????????????????????if(first == 0) {
??????????????????????????????????????first = data;
??????????????????????????????} else if(second == 0) {
??????????????????????????????????????second = data;
??????????????????????????????} else if(third == 0) {
??????????????????????????????????????third = data;
??????????????????????????????}
??????????????????????}
??????????????????????bakData = data;
????????}
????????????
????????????????printf("%d", first);
????????????
????????????????printf("%d", second);
????
????????????????printf("%d", third);
??????????
????????return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '?' token
2 | ????????????
| ^
|
s596333484
|
p00001
|
C
|
file:///home/ooki/AOJ/top3.c
|
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
1 | file:///home/ooki/AOJ/top3.c
| ^
|
s215773954
|
p00001
|
C
|
#include<stdio.h>
int main(){
int x;
int i;
int max1 = 0;
int max2 = 0;
int max3 = 0;
for(i=0;i<9;i++)
{
scanf("%d", &x);
if( max1 >= x)
{
max3 = max2;
max2 = max1;
max1 = x;
}
else
{
if( max2 >= x)
{
max3 = max2;
max2 = x;
}
else
{
if( max3 >= x)
{
max3 = x;
}
}
}
}
print("%d\n%d\n%d",max1,max2,max3);
return 0;
}
|
main.c: In function 'main':
main.c:36:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
36 | print("%d\n%d\n%d",max1,max2,max3);
| ^~~~~
| printf
|
s258634807
|
p00001
|
C
|
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
vector<int> height(10);
for (int i = 0; i < 10; i++) {
cin >> height[i];
}
sort(height.begin(), height.end(), greater<int>());
for (int i = 0; i < 3; i++) {
cout << height[i] << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s765525211
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i;
int height[10];
for(i = 0; i < 10; i++)
{
scanf("%d",height[i]);
}
s_sort(height);
for(i = 0; i < 3; i++)
{
printf("%d\n",height[i]);
}
return 0;
}
int s_sort(int *height)
{
int i;
int temp, flag;
do{
flag = 0;
for(i = 0; i < 9; i++){
if(height+i > height+i + 1){
flag = 1;
temp = height+i + 1;
height+i + 1 = height+i;
height+i = temp;
}
}
}while(flag);
return 0;
}
|
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 's_sort' [-Wimplicit-function-declaration]
13 | s_sort(height);
| ^~~~~~
main.c: In function 's_sort':
main.c:33:26: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
33 | temp = height+i + 1;
| ^
main.c:34:34: error: lvalue required as left operand of assignment
34 | height+i + 1 = height+i;
| ^
main.c:35:30: error: lvalue required as left operand of assignment
35 | height+i = temp;
| ^
|
s324482814
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int m[10],a,b,i,j,tmp;
for(a=0;a<=9;a++){
scanf("%d",&m[a]);
}
for(i=1;i<=9;i++)
{
for(j=0;j<=9;j++)
{
if(m[j+1]<m[j])
{
tmp = m[j];
m[j] = m[j+1];
m[j+1] = tmp;
}
}
}
for(b=9;b>=7;b--)
{
printf("%d\n",m[b]);
}
return 0;
|
main.c: In function 'main':
main.c:24:5: error: expected declaration or statement at end of input
24 | return 0;
| ^~~~~~
|
s823708322
|
p00001
|
C
|
#include<stdio.h>
int main(void)
{
int m[10],i,j,tmp;
for(i=0;i<=9;i++){
scanf("%d",&m[i]);
}
for(i=1;i<=9;i++)
{
for(j=0;j<=9;j++)
{
if(m[j+1]<m[j])
{
tmp = m[j];
m[j] = m[j+1];
m[j+1] = tmp;
}
}
}
for(i=9;i>=7;i--)
{
printf("%d\n",m[i]);
}
return 0:
}
|
main.c: In function 'main':
main.c:24:13: error: expected ';' before ':' token
24 | return 0:
| ^
| ;
|
s258312542
|
p00001
|
C
|
{
int a[10], n[10], max = 0;
int i, s, j;
int ans[3];
for (i = 0; i < 10; i++){
a[i] = 0;
}
for (i = 0; i < 10; i++){
scanf("%d", &n[i]);
}
for (j = 0; j < 3; j++){
for (i = 0; i < 10; i++){
if (max < n[i]){
max = n[i];
s = i;
}
}
// puts("a");
ans[j] = max;
max = 0;
a[s] = j + 1;
n[s] = 0;
}
for (i = 0; i < 10; i++){
// printf("n[%d]:%d\n", i, n[i]);
}
/*
for (i = 0; i < 3; i++){
if (a[i] == 1){
f = n[i];
}
else if (a[i] == 2){
c = n[i];
}
else if (a[i] == 3){
t = n[i];
}
else {
}
}
printf("%d\n%d\n%d\n\n", f, c, t);
*/
for (i = 0; i < 3; i++){
printf("%d\n", ans[i]);
}
return (0);
}
|
main.c:1:2: error: expected identifier or '(' before '{' token
1 | {
| ^
|
s905395127
|
p00001
|
C
|
{
int a[10], n[10], max = 0;
int i, s, j;
int ans[3];
for (i = 0; i < 10; i++){
a[i] = 0;
}
for (i = 0; i < 10; i++){
scanf("%d", &n[i]);
}
for (j = 0; j < 3; j++){
for (i = 0; i < 10; i++){
if (max < n[i]){
max = n[i];
s = i;
}
}
// puts("a");
ans[j] = max;
max = 0;
a[s] = j + 1;
n[s] = 0;
}
for (i = 0; i < 10; i++){
// printf("n[%d]:%d\n", i, n[i]);
}
/*
for (i = 0; i < 3; i++){
if (a[i] == 1){
f = n[i];
}
else if (a[i] == 2){
c = n[i];
}
else if (a[i] == 3){
t = n[i];
}
else {
}
}
printf("%d\n%d\n%d\n\n", f, c, t);
*/
for (i = 0; i < 3; i++){
printf("%d\n", ans[i]);
}
return (0);
}
|
main.c:1:2: error: expected identifier or '(' before '{' token
1 | {
| ^
|
s560793152
|
p00001
|
C
|
#include <stdio.h>
int main(){
int h[10];
int a;
int i;
for(i=0; i<10; i++){
scanf("%d",&h[i]);
}
a=0;
for(i=0; i<10; i++){
if(h[a]<h[i]) a+=1;
}
printf("%d\n",h[a]);
h[a]=0;
a=0;
for(i=0; i<10; i++){
if(h[a]<h[i]) a+=1;
}
printf("%d\n",h[a]);
for(i=0; i<10; i++){
if(h[a]<h[i]) a+=1;
}
printf("%d\n",h[a]);
h[a]=0;
a=0;
h[a]=0;
a=0;
|
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
30 | a=0;
| ^
|
s878775885
|
p00001
|
C
|
#include <stdio.h>
int main(void){
int high[10];
int i, j, tmp;
for (i = 0; i < 10; i++) scanf("%d", &high[i]);
for (i = 0; i < 3; i++){
for (j = 9; j > i; j--){
if (high[j-1] > high[j]){
tmp = high[j-1];
high[j-1] = high[j];
high[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) printf("%d\n", high[9-i]);
return 0;
}#include <stdio.h>
int main(void){
int high[10];
int i, j, tmp;
for (i = 0; i < 10; i++) scanf("%d", &high[i]);
for (i = 0; i < 3; i++){
for (j = 9; j > i; j--){
if (high[j-1] > high[j]){
tmp = high[j-1];
high[j-1] = high[j];
high[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) printf("%d\n", high[9-i]);
return 0;
}
|
main.c:22:2: error: stray '#' in program
22 | }#include <stdio.h>
| ^
main.c:22:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
22 | }#include <stdio.h>
| ^
|
s736594039
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int h[10];
int max=0;
int t;
int n;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
}
for(i=0;i<3;i++){
for(j=i;j<10;j++){
if(h[i] > max]){
max = h[i];
n = i;
}
t = h[i];
h[i] = max;
h[n] = t;
max=0;
n = 0;
}
for(i=0; i<3; i++){
printf("%d\n",h[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: expected ')' before ']' token
16 | if(h[i] > max]){
| ~ ^
| )
main.c:16:27: error: expected statement before ']' token
main.c:16:28: error: expected statement before ')' token
16 | if(h[i] > max]){
| ^
main.c:31:1: error: expected declaration or statement at end of input
31 | }
| ^
|
s345733575
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int h[10];
int max=0;
int t;
int n;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
}
for(i=0;i<3;i++){
for(j=i;j<10;j++){
if(h[i] > max]){
max = h[i];
n = i;
}
t = h[i];
h[i] = max;
h[n] = t;
max=0;
n = 0;
}
for(i=0; i<3; i++){
printf("%d\n",h[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: expected ')' before ']' token
16 | if(h[i] > max]){
| ~ ^
| )
main.c:16:27: error: expected statement before ']' token
main.c:16:28: error: expected statement before ')' token
16 | if(h[i] > max]){
| ^
main.c:31:1: error: expected declaration or statement at end of input
31 | }
| ^
|
s564393622
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int h[10];
int max=0;
int t;
int n;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
}
for(i=0;i<3;i++){
for(j=i;j<10;j++){
if(h[i] > max]){
max = h[i];
n = i;
}
t = h[i];
h[i] = max;
h[n] = t;
max=0;
n = 0;
}
}
}
|
main.c: In function 'main':
main.c:16:27: error: expected ')' before ']' token
16 | if(h[i] > max]){
| ~ ^
| )
main.c:16:27: error: expected statement before ']' token
main.c:16:28: error: expected statement before ')' token
16 | if(h[i] > max]){
| ^
|
s861267702
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int h[10];
int max=0;
int t;
int n;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
}
for(i=0;i<3;i++){
for(j=i;j<10;j++){
if(h[i] > max]){
max = h[i];
n = i;
}
t = h[i];
h[i] = max;
h[n] = t;
max=0;
n = 0;
}
}
for(i=0; i<3; i++){
printf("%d\n",h[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: expected ')' before ']' token
16 | if(h[i] > max]){
| ~ ^
| )
main.c:16:27: error: expected statement before ']' token
main.c:16:28: error: expected statement before ')' token
16 | if(h[i] > max]){
| ^
|
s341374594
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i,j;
int h[10];
int max=0;
int t;
int n;
for(i=0;i<10;i++){
n = getc()
h[i] = n;
}
for(i=0;i<3;i++){
for(j=i;j<10;j++){
if(h[i] > max){
max = h[i];
n = i;
}
t = h[i];
h[i] = max;
h[n] = t;
max=0;
n = 0;
}
}
for(i=0; i<3; i++){
printf("%d\n",h[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:13: error: too few arguments to function 'getc'
11 | n = getc()
| ^~~~
In file included from main.c:1:
/usr/include/stdio.h:576:12: note: declared here
576 | extern int getc (FILE *__stream) __nonnull ((1));
| ^~~~
main.c:11:19: error: expected ';' before 'h'
11 | n = getc()
| ^
| ;
12 | h[i] = n;
| ~
|
s913742260
|
p00001
|
C
|
#include<stdio.h>
#define N 10
int main()
{
int i,j,idx,tmp,data[N];
for(i=0;i<N;i++)
{
scanf("%d",&data[i]);
}
for(i=0;i<3;i++)
{
idx=i;
for(j=i+1;j<N;j++)
{
if(data[j]>data[idx])
idx=j;
}
tmp=data[i];
data[i]=data[idx];
data[idx]=tmp;
}
for(i=0;i<3;i++)
{
printf("%d\n",data[i]);
}return 0;
}
|
main.c: In function 'main':
main.c:28:9: error: invalid suffix ";" on integer constant
28 | }return 0;
| ^~~
main.c:28:12: error: expected ';' before '}' token
28 | }return 0;
| ^
| ;
29 | }
| ~
|
s189022691
|
p00001
|
C
|
#include<bits/stdc++.h>
using namespace std;
int a[20];
int main()
{
for(int i=1;i<=10;++i)
scanf("%d",&a[i]);
sort(&a[1],&a[11]);
printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
return 0;
}
|
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s399309417
|
p00001
|
C
|
#include <cstdio>
#include <algorithm>
using namespace std;
int a[20];
int main()
{
for (int i = 1; i <= 10; ++i)
scanf("%d", &a[i]);
sort(a+1, a+11);
printf("%d\n%d\n%d\n", a[10], a[9], a[8]);
return 0;
}
|
main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s636013554
|
p00001
|
C
|
#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main()
{
int a[10];
for(int i=0;i<10;i++)cin>>a[i];
sort(a,a+10);
cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s728791485
|
p00001
|
C
|
#include <stdio.h>
#include <stdlib.h>
#define NUM_DATA 10
#define SHOW_NUM 3
int BubSort(int x[ ], int n)
{
int i, j, temp;
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (x[j - 1] < x[j]) {
temp = x[j];
x[j] = x[j - 1];
x[j - 1]= temp;
}
}
}
}
void ShowData(int x[ ], int n)
{
int i;
for (i = 0; i < n ; i++)
printf("%d\n", x[i]);
}
void main(void)
{
int x[LINE_BUF_SIZE];
for (int i = 0; i < NUM_DATA; i++) {
int n;
scanf("%d", &n);
x[i] = n;
}
BubSort(x, NUM_DATA);
ShowData(x, SHOW_NUM);
}
|
main.c: In function 'main':
main.c:31:11: error: 'LINE_BUF_SIZE' undeclared (first use in this function)
31 | int x[LINE_BUF_SIZE];
| ^~~~~~~~~~~~~
main.c:31:11: note: each undeclared identifier is reported only once for each function it appears in
|
s108599330
|
p00001
|
C
|
#include<stdio.h>
??
void swap(int *x,int *y){
????????????????int temp;
??
????????????????temp=*x;
????????????????*x=*y;
????????????????*y=temp;
??
}
??
int main(void){
????????????????int i,j,k;
????????????????int height[10];
??
????????????????i=0;
??
????????????????while(scanf("%d",&height[i])==1){
????????????????????????????????i++;
????????????????????????????????if(i==10) break;
????????????????}
??
??
????????????????for(j=0;j<10;j++){
????????????????????????????????if(height[j]<0 || height[j]>10000){
????????????????????????????????????????????????height[j]=0;
????????????????????????????????}
????????????????}
??
??
??
????????????????for(i=0;i<10;i++){
????????????????????????????????for(j=0;j<10;j++){
????????????????????????????????????????????????if(height[i]<height[j]){
????????????????????????????????????????????????swap(&height[i],&height[j]);
????????????????????????????????????????????????}
????????????????????????????????}
????????????????}???????????? /*sort*/
??
????????????????printf("\n");
??
????????????????k=9;
??
??
????????????????while(1){
????????????????????????????????printf("%d\n",height[k]);
????????????????????????????????k--;
????????????????????????????????if(k==6) break;
????????????????}
??
??
??
??
????????????????return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
main.c:11:1: error: expected identifier or '(' before '?' token
11 | ??
| ^
|
s024678231
|
p00001
|
C
|
#include<stdio.h>
??
void swap(int *x,int *y){
????????????????int temp;
??
????????????????temp=*x;
????????????????*x=*y;
????????????????*y=temp;
??
}
??
int main(void){
????????????????int i,j,k;
????????????????int height[10];
??
????????????????i=0;
??
????????????????while(scanf("%d",&height[i])==1){
????????????????????????????????i++;
????????????????????????????????if(i==10) break;
????????????????}
??
??
????????????????for(j=0;j<10;j++){
????????????????????????????????if(height[j]<0 || height[j]>10000){
????????????????????????????????????????????????height[j]=0;
????????????????????????????????}
????????????????}
??
??
??
????????????????for(i=0;i<10;i++){
????????????????????????????????for(j=0;j<10;j++){
????????????????????????????????????????????????if(height[i]<height[j]){
????????????????????????????????????????????????swap(&height[i],&height[j]);
????????????????????????????????????????????????}
????????????????????????????????}
????????????????}???????????? /*sort*/
??
????????????????printf("\n");
??
????????????????k=9;
??
??
????????????????while(1){
????????????????????????????????printf("%d\n",height[k]);
????????????????????????????????k--;
????????????????????????????????if(k==6) break;
????????????????}
??
??
??
??
????????????????return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
main.c:11:1: error: expected identifier or '(' before '?' token
11 | ??
| ^
|
s004807447
|
p00001
|
C
|
#include<stdio.h>
int main(){
int i, j, mountains[10], temp, number=1, error=0;
for(i=0; i<=9; i++){
printf("Height of Mountain %d : ", number);
scanf(" %d", &mountains[i]);
if((0 > mountains[i]) || (mountains[i] > 10000)){
error++;
break;
}
number++;
}
if(error = 0){
for(i=0; i<=9; i++){
for(j=i; j<=9; j++){
if(mountains[i] < mountains[j]){
temp = mountains[i];
mountains[i] = mountains[j];
mountains[j] = temp;
}
}
}
for(i=0; i<=9; i++){
printf("%d", mountain[i]);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:28:23: error: 'mountain' undeclared (first use in this function); did you mean 'mountains'?
28 | printf("%d", mountain[i]);
| ^~~~~~~~
| mountains
main.c:28:23: note: each undeclared identifier is reported only once for each function it appears in
|
s332186517
|
p00001
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main(){
int i,top1,top2,top3,b,c;
int val[10];
for(i = 0; i < 10; i++){
scanf("%d", &val[i]);
}
top1=val[0];
for(i=0 ; i<10;i++){
if(top1-val[i]>0){
b=a[i]
c=i
}
}
top1=b;
val[c]=0
b=0;
top2=val[0];
for(i=0 ; i<10;i++){
if(top2-val[i]>0){
b=val[i]
c=i
}
}
top2=b;
val[c]=0
b=0;
top3=val[0];
for(i=0 ; i<10;i++){
if(top3-val[i]>0){
b=val[i]
c=i
}
}
top3=b;
printf("%d\n%d\n%d\n",top1,top2,top3);
return 0;
}
|
main.c: In function 'main':
main.c:14:3: error: 'a' undeclared (first use in this function)
14 | b=a[i]
| ^
main.c:14:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:7: error: expected ';' before 'c'
14 | b=a[i]
| ^
| ;
15 | c=i
| ~
main.c:19:9: error: expected ';' before 'b'
19 | val[c]=0
| ^
| ;
20 | b=0;
| ~
main.c:25:9: error: expected ';' before 'c'
25 | b=val[i]
| ^
| ;
26 | c=i
| ~
main.c:30:9: error: expected ';' before 'b'
30 | val[c]=0
| ^
| ;
31 | b=0;
| ~
main.c:36:9: error: expected ';' before 'c'
36 | b=val[i]
| ^
| ;
37 | c=i
| ~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.