#include using namespace std; int main() { int a[100],n,i,item,loc=0; cout>n; cout>a[i]; } cout>item; for(i=1;i0) { cout


#include


using namespace std;


int main()
{
    int a[100],n,i,item,loc=0;
    cout<"enter number="" of="" elements:="">
    cin>>n;
    cout<"\nenter>
    for(i=1;i<>
    {
        cin>>a[i];
    }
    cout<"\nenter number="" to="">
    cin>>item;
    for(i=1;i<>
    {
        if(item==a[i])
        {
            loc=i;
            break;
        }
    }
    if(loc>0)
    {
        cout<><" is="" the="" location="" of="">
    }
    else
    cout<"\nno. not="">
}


Q: edit the code that shows after how many number of iteration searched value is found



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here