Advertisement
shawonrog

PROBLEM 2 bio

Dec 10th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.     char A[1000];
  6.     int i,j;
  7.     gets(A);
  8.     int len = strlen(A);
  9.     strrev(A);
  10.     for( i=0;i<len;i++)
  11.     {
  12.         if(A[i] == 'A'){
  13.            A[i]='T';
  14.         }
  15.         else if(A[i] == 'C'){
  16.            A[i]='G';
  17.         }
  18.         else if(A[i] == 'G'){
  19.            A[i]='C';
  20.         }
  21.         else if(A[i] == 'T'){
  22.            A[i]='A';
  23.         }
  24.     }
  25.     printf("%s \n", A);
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement