2 Comments

  1. O metoda putin mai usoara, poate nu chiar la fel de eficienta.

    int main()
    {
    fstream f(“bac.txt”);
    int n,m,a[100],b[100],i,j;
    f>>n>>m;
    for(i=1;i>a[i];
    for(j=1;j>b[j];
    for(i=1;i<=n;i++)
    {
    for(j=1;j<=m;j++)
    if(a[i]==b[j])
    cout<<a[i]<<" ";
    }
    }

    2

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *