Solutions

Using Array Finding Element in Index of Array | [*Solved*] | C++

Source code

#include<iostream>
using namespace std;
int main()
{
       int enter;
       int find[6];
       cout << “Enter Numbers to save in array” << endl;
       for(int i = 0; i < 6; i ++)
       {
              cin >> find[i];
       }
       cout <<“Enter a Number you want to see the address of number in array\n”;
       cin >> enter;
       int j;
       for(j = 0; j <= 6; j++)
       {
                     if(find[j] == enter)
                     {
                           cout << “The Address is: ” << j+1;          
                           break;
                     }
       }
                return 0;
}

Output

finding index of element in array

About the author

Syed Moin Ali

Hello My Name is Syed Moin Ali and I am the founder of PC Learnings Here on this blog I write about Blogging, SEO, Internet Tricks, Social Networking Site, and Make Money

Add Comment

Click here to post a comment