Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void compareDNA(char DNA[][10], int relCount, int results[][10])
- {
- for (int i = 0; i < relCount; i++)
- {
- int match;
- for (int x = 0; x < 10; x++)
- {
- if (DNA[0][x] == DNA[i + 1][x])
- {
- match++;
- }
- } match = match * 10;
- results[match];
- }
- ///////////////////////////////////////////////////////
- void displayResults(char relName[][10], int results[][10], int relCount)
- {
- for (int i = 0; i < relCount; i++)
- {
- cout << "Percent match for " << relName[i + 1] << ": " << results[i + 1][10] << "%" << endl;
- }
- }
- /////////////////////////////////////////
- int main()
- {
- char DNA[10][10];
- int relCount;
- char relName[10][10];
- int results[10][10];
- getDNA(DNA);
- getRelCount(relCount);
- getRelName(relName, relCount);
- getRelDNA(DNA, relName, relCount);
- compareDNA(DNA, relCount, results);
- displayResults(relName, results, relCount);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement