aboutsummaryrefslogtreecommitdiff
path: root/10b/10.8.7/funcs.cpp
blob: 80a77957a62336b3d9c1702a2efe88f738cbb6f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "header.h"
#include <iostream>

using namespace std;

void GetInput(char s1[], char s2[], int& amt)
{
	cout << "Input the first stirng: ";
	cin >> s1;

	cout << "Input the second string: ";
	cin >> s2;

	cout << "How many charcters to compare: ";
	cin >> amt;
}

bool Compare(char s1[], char s2[], int n)
{
	for (int i = 0; i < n; i++)
	{
		if (!(s1[i] == s2[i]))
		{
			return false;
		}
	}

	return true;
}