[QUOTE]Originariamente inviato da m3kka
...
codice:
        private void button1_Click(object sender, EventArgs e)
        {
            int dim = textBox1.Text.Length;
            int i = textBox1.Text.Length, a = (textBox1.Text.Length * 3);
            char[] seq = new char[i];
            string nseq = "";


            seq = textBox1.Text.ToCharArray();
            for(i=textBox1.Text.Length - 1; i>=0; i--)
            {
                if (seq[i] == 'k')
                {
                    if (seq[i - 1] == 'a')
                    {

                        nseq = nseq.Insert(a, "AAG");
                        a = a - 3;
                    }
                }
            }


            textBox1.Text = nseq;
            
        }
[quote]