Submission #7052

# Submission time Handle Problem Language Result Execution time Memory
7052 2014-07-20T10:29:00 Z koosaga 쉬운 문제 (GA3_easy) C++
Compilation error
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]