Files
cpp-daniel-linearsearch/LinearSearch.cpp
2020-12-07 10:00:18 +01:00

30 lines
504 B
C++

#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;
}