Submission #666

# Submission time Handle Problem Language Result Execution time Memory
666 2013-03-01T02:18:47 Z jyuno426 짝수 정렬 (tutorial3) C++
Compilation error
0 ms 0 KB
#include "grader.h"
#include <algorithm>

void sort_even(int N, int *A) {
	int m = 0;

	for(i = 0; i < N; i++)
	{
		if(A[i] % 2 == 0) 
			A[m++] = A[i];
	}

	std::sort(A,A+m);

	for(i = 0; i < m; i++) Report(A[i]);
}

Compilation message

grader.cpp:37:2: warning: no newline at end of file
In file included from tutorial3.cpp:1:
grader.h:1:22: warning: no newline at end of file
tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:7: error: 'i' was not declared in this scope