Initial commit
This commit is contained in:
29
LinearSearch.cpp
Normal file
29
LinearSearch.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "LinearSearch.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void Read(int a[], int& size_ref, int max_size)
|
||||
{
|
||||
// Do my stuff
|
||||
size_ref = 0;
|
||||
|
||||
for (int i = 0; i < 15; i++) {
|
||||
a[i] = rand();
|
||||
cout << "a[" << i << "]: " << a[i] << endl;
|
||||
size_ref++;
|
||||
}
|
||||
}
|
||||
|
||||
void Print(const int a[], int size)
|
||||
{
|
||||
cout << "Array size of a[]: " << size << endl;
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
cout << "a[" << i << "]: " << a[i] << endl;
|
||||
}
|
||||
|
||||
int LinearSearch(const int array[], int key, int size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user