Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdbool.h>
- int main()
- {
- char DNA[21];
- scanf("%[^\n]", DNA);
- for (int i=0; i < strlen(DNA); i++) {
- if (DNA[i] == 'A') {
- for (int j=0; j<2; j++) printf("A");
- } else if (DNA[i] == 'T') {
- for (int j=0; j<3; j++) printf("T");
- } else if (DNA[i] == 'C') {
- printf("C");
- }
- }
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement