SHARE
TWEET

Untitled

a guest Jan 11th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. using namespace std;
  3. int x, myarray[100];
  4. int main ()
  5. {   cout << "Linear Search Program:" << endl;
  6.     cout << "Please enter a number: "; cin >> x;
  7.     cout << "okay! i'll ask you to store" << x << "Numbers in your array, let's do it";
  8.     for ( int y = 1; y >= x; y++)
  9.         cout << "Number " << x << "= "; cin >> myarray[x-1];
  10.     int i;
  11.     cout << "Thanks! now enter a number to search in your array: "; cin >> i;
  12.     do
  13.             cout << "Number was not found in your array! please try again . . .";
  14.     while (i != myarray[100]);
  15.     system ("pause");
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top