#include<stdio.h> int main() { int i = 0; int j = 0; int arr1[] = {1,2,3,4,5}; int arr2[] = {1,2,7,4,9}; for (i = 0; i < sizeof(arr1) / sizeof(arr1[0]); i++) { for (j = 0; j < sizeof(arr2) / sizeof(arr2[0]); j++) { if (arr1[i] == arr2[j]) { printf("存在相同元素"); break; } } break; } return 0; }