Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Whats the C++ code to this? So that my output is: CCTAGAATG | | X | | X | | GGACCTAAC Validity: 77.7778% Stability: 57.1429%

Whats the C++ code to this? So that my output is:
CCTAGAATG
| | X | | X | |
GGACCTAAC
Validity: 77.7778%
Stability: 57.1429%
image text in transcribed
Part #02 The goal is to write a complete C++ program that inputs 2 strings from the keyboard, where each string denotes a DNA strand such as CCTAGAATG. Assume the 2 strings are the same length. The program will then CS 109: htp:/bwww.csic.edu i109 Page I of 3 line up the two strands to see how many of the pairs form valid base pairs, ie. that a C is paired with a G and an A is paired with a T. The program also outputs the percentage of valid base pairs, and the stability of the DNA strand formed by the valid base pairs. For example, suppose the following two strings are input from the keyboard: CCTAGAATG and GGACCTAAC. The program outputs the following: CCTAGAATG IIIxI IXII GGACCTAAC Validity: 77.7778% Stability: 57.1429% The program outputs the 1st strand, then compares each characters in the first strand to the corresponding character in the second strand. If the characters form a valid base pair, then 'l' is output connecting the two characters (that's the vertical bar character on right-side of keyboard). If the characters do not form a valid base pair, then 'X' is output denoting that the pair is not valid. This output is followed by the 2nd strand, and then the percentage of valid pairs (7/9 in this case) and the stability of the DNA strand formed by the valid base pairs. The notion of stability is defined as the percentage of C and G characters in the subset of valid base pairs (from either string). For example, given the strings above, pick either string. There are 7 valid base pairs, and within those 7 there are 4 C and G characters. So that's 4/7, or 57.1429%. Assume the user will enter valid strings that contain a sequence of capital letters consisting of 'A,'C','G', and T. Also assume the two strings entered by the user are the same length

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

Step: 3

blur-text-image

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

What is readily determinable fair value as per FAS 115?

Answered: 1 week ago