Question: C++ /* Write code for function get_gc_content that accepts a const reference string parameter and returns a double. /* Write code that prompts user to

C++

/*

Write code for function get_gc_content that accepts

a const reference string parameter and returns a double.

/*

Write code that prompts user to enter 1 for Get GC Content,

or 2 for Get DNA Complement. The program will prompt user for a

DNA string and call either get gc content or get dna complement

function and display the result. Program runs as long as

user enters a y or Y.

Calculate GC content:

Iterate string count Gs and Cs, divide count by string length.

Return quotient.

*/

/*

Write code for function get_reverse_string that

accepts a string parameter and returns a string reversed.

*/

/*

Write prototype for function get_dna_complement that

accepts a string dna and returns a string.

Calculate dna complement:

a. call function get_reverse_string(dna), save results to a local string variable

b. iterate local string variable and

replace A with T, T with A, C with G and G with C

c. return string

*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!