subject

Your program will first prompt the user to enter a single dna sequence, which it should validate for legality (i. e., only the four valid bases) — you might do this validation by writing a function that takes a string as a parameter and returns a boolean. re-prompt the user if the input was invalid. once you have a valid input, compute the following statistics (each should be implemented as a separate function, called from

count the number of occurrences of "c".

determine the fraction of cytosine and guanine nucleotides. for example, if half of the nucleotides in the sequence are either "c" or "g", the fraction should be 0.5.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:40
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
You know the right answer?
Your program will first prompt the user to enter a single dna sequence, which it should validate for...
Questions
question
Mathematics, 20.11.2020 20:10
question
Physics, 20.11.2020 20:10
question
Social Studies, 20.11.2020 20:10
question
Mathematics, 20.11.2020 20:10
Questions on the website: 13722367