Question: c++ write the function Part 1- Compare two sequences to each other float similarityScore (string sequence1, string sequence2) Define the similarityScore function. This function takes
c++ write the function
Part 1- Compare two sequences to each other float similarityScore (string sequence1, string sequence2) Define the similarityScore function. This function takes two string arguments, calculates their Hamming distance, and returns their similarity score as a floating-point number. This function should only calculate the similarity if the two strings are the same length, otherwise return 0. You should implement your main function to repeatedly ask to the user for 2 strings (sequence1 and sequence2) such that you can pass them as parameters to your similarityScore function. Writing your own main function will allow you to test and debug every function you write. Example sequence! = CCGCCGCCGA sequence2 CCTCCTCCTA Matches = 7, Mismatches = 3 Hamming distance 3, Length 10 Similarity (0-3) /10 -.7 result = similarityScore(CCGCCGCCGA", cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
