Need Help ?

Home / Expert Answers / Other / Description Nesting: L. 2 Application, Code Writing (Biology). Write a program to transcribe DNA t

Description Nesting: L. 2 Application, Code Writing (Biology). Write a program to transcribe DNA t ...


Description Nesting: L. 2 Application, Code Writing (Biology). Write a program to transcribe DNA to RNA. Have the user enter a string called dna, then loop over it and transcribe each character as follows: A->U, T->A, C->G, G->C. Make sure it is formatted correctly [5]. Example interaction is shown below. > ACGTGA // input < UGCACU // output note: I have written a program that will transcribe one into the other, but I can't figure out how to get it to transcribe a string input. This is what I have come up with: #include using namespace std; int main() { cout << "> "; cin >> dna; int a = dna; cout << "< "; if (a == 'A') cout << 'U'; else if (a == 'C') cout << 'G'; else if (a == 'G') cout << 'C'; else if (a == 'T') cout << 'A'; cout << " "<< endl; return 0; } I'm pretty sure the program has to include a for loop, but I'm uncertain as to how to initialize it and what the condition would be.



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp