Quick actions

cmd+k|ctrl+k

Navigation

Languages

I-1

Snippet info

Language

Cpp

Visibility

public

Author

amangoyal1727

Created

2021-01-06T11:02:11Z

Updated

2021-01-06T11:02:11Z

#include <iostream>
using namespace std;

bool check(int *A1 , int *A2 ,int n1 ,int n2){
    
    for(int i=0 ; i<n1 ; i++){
        for(int j=0 ; j<n2 ; j++){
            if(A1[i]==A2[j]){
                return true;
            }
        }
    }
    return false;
}

int main(){
    int A1[5] = {1,2,3,4,5};
    int A2[5] = {11,12,7,8,9};
    
    cout<<check(A1,A2,5,5);
    
}
INFO