programming help

Discussion in 'C' started by arindam.kotal, Jan 26, 2013.

  1. arindam.kotal

    arindam.kotal New Member

    Joined:
    Nov 4, 2012
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    I am writing a program which will find matching position of similar charecter between three sequences.
    1 2 3 4 5 6 7 8 9
    suppose, S1=T C C A T A G T C
    S2=A G C T A A T A G
    S3=G G A T T A G C T
    Now, I want to print for A like,
    (4,1,3)
    (6,5,6)
    (0,6,0)
    (0,8,0)
    For T,
    (1,4,4)
    (5,7,5)
    (8,0,9)
    For G,
    (7,2,1),
    (0,9,2)
    (0,0,7)
    For C,
    (2,3,8)
    (3,0,0)
    (9,0,0)
    plz,help me....
     
  2. Larry85

    Larry85 New Member

    Joined:
    Jan 27, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    #include <stdio.h>

    int main()
    {
    int s1[9]={'T','C','C','A','T','A','G','T','C'};
    int loop;

    for(loop=0;loop<9;loop++)
    {
    if(s1[loop]=='T')
    printf("%d\t",loop+1);
    }
    return 0;
    }
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice