unsolved

S

sivasish

hi any body can help me to write this program

Q.prompt the user to enter two strins of dna.concatenate the two
strings of DNA by appending the second to the first using ".="
operator. print the two strings as concatenated and then print the
second string lined up over its copy at the end of the concatenated
strings. for example
input string are
AAAAAA
TTTTTT
print as AAAAAATTTTTT
TTTTTT

i wrote the code for the first part but not able proceed further.i.e
how to print the above .
 
D

David Squire

sivasish said:
hi any body can help me to write this program

Q.prompt the user to enter two strins of dna.concatenate the two
strings of DNA by appending the second to the first using ".="
operator. print the two strings as concatenated and then print the
second string lined up over its copy at the end of the concatenated
strings. for example
input string are
AAAAAA
TTTTTT
print as AAAAAATTTTTT
TTTTTT

i wrote the code for the first part but not able proceed further.i.e
how to print the above .

Hmmm. Looks like you were on about 5/10 for you assignment, but should
now be heading for 0/10 for cheating.
 
S

sivasish

its nt like that . i am learning by my own without any tutor.so.. i
need help. please help me out
 
D

David Squire

sivasish said:
its nt like that . i am learning by my own without any tutor.so.. i
need help. please help me out

You need to start by helping yourself. First, learn how to use usenet.
For a start:

- Don't change the subject of a thread so that it has no relationship to
its original subject
- Quote context when you reply to a message (Your failure to do this,
along with the change of subject meant that I had no idea what this
message was about (until I remembered replying to you a little while ago
- most people here would have had no chance)
- Read the posting guidelines for this group (posted here twice a week)
and follow them when posting here. Most importantly, show us your code,
don't ask us to write it for you.


DS
 
J

John W. Krahn

sivasish said:
hi any body can help me to write this program

Q.prompt the user to enter two strins of dna.concatenate the two
strings of DNA by appending the second to the first using ".="
operator. print the two strings as concatenated and then print the
second string lined up over its copy at the end of the concatenated
strings. for example
input string are
AAAAAA
TTTTTT
print as AAAAAATTTTTT
TTTTTT

i wrote the code for the first part but not able proceed further.i.e
how to print the above .

use warnings;
use strict;

print 'Enter the first string: ';
chomp( my $first = <STDIN> ):
print 'Enter the second string: ';
chomp( my $second = <STDIN> ):
print "$first$second\n";
$first =~ tr// /c;
print "$first$second\n";




John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top