답안 #7052

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7052 2014-07-20T10:29:00 Z koosaga 쉬운 문제 (GA3_easy) C++
컴파일 오류
0 ms 0 KB
#include <stdio.h>

int CountPair(int n, int *A){
    for (i=0; i<n-1; i++) {
        for (j=i+1; j<n; j++) {
            if(a[j]%a[i]==0) r++;
        }
    }
  return r;
}

Compilation message

easy.cpp: In function 'int CountPair(int, int*)':
easy.cpp:4:10: error: 'i' was not declared in this scope
easy.cpp:5:14: error: 'j' was not declared in this scope
easy.cpp:6:16: error: 'a' was not declared in this scope
easy.cpp:6:30: error: 'r' was not declared in this scope
easy.cpp:9:10: error: 'r' was not declared in this scope
easy.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type]