Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago