Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

would output yesl since the string CS109 starts with the character 'C. Remember that characters in C++ are denoted by a single', while strings of

image text in transcribed
would output yesl since the string "CS109 starts with the character 'C. Remember that characters in C++ are denoted by a single', while strings of characters are denoted by double" 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:hi:/www.cs.c edw-1109 Page I of 3 line up the two strands to see how many of the pairs form valid base pairs, Le. that a C is paired with a G and an A is paired with DNA strand formed by the valid base pairs a T. The program also outputs the percentage of valid base pairs, and the stability of the For example, suppose the following two strings are input from the keyboard: CCTAGAATG and GGACCTAAC. The program outputs the following: CCTAGAATG IxxII GGACCTAAC validity: 77.7778% Stability: 57.1429% The program outputs the 1* 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, thenX' is output denoting that the pair is not valid. This output is followed by the 2rd 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 stobility is defined as the percentage of Cand 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 ACG and T. Also assume the two strings entered by the user are the same length. MacBook Air

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions