Submission #3126

#TimeUsernameProblemLanguageResultExecution timeMemory
3126beegle20짝수 정렬 (tutorial3)C++98
Compilation error
0 ms0 KiB
#include<algorithm>
#include "grader.h"

int sort_even(int N, int *A)
{
  std::sort(A,A+N)
  for(int i=0;i<N;i++)
  {
    if(A[i]%2==0)
      Report(A[i]);
  }
}

Compilation message (stderr)

tutorial3.cpp: In function 'int sort_even(int, int*)':
tutorial3.cpp:7:3: error: expected ';' before 'for'
tutorial3.cpp:7:15: error: 'i' was not declared in this scope
tutorial3.cpp:7:22: error: expected ';' before ')' token
tutorial3.cpp:12:1: warning: no return statement in function returning non-void [-Wreturn-type]