0_0_17778928_4046.cpp: In function 'int main()': 0_0_17778928_4046.cpp:33:43: error: 'j' was not declared in this scope scanf("%d%d", &arr[i].x, &arr[j].y); ^