Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char s[1000];
- int i,A,G,T,C;
- A = G = T = C = 0 ;
- gets(s);
- int len = strlen(s);
- for ( i=0;i<len;i++)
- {
- if(s[i] == 'A') A++ ;
- if(s[i] == 'C') C++ ;
- if(s[i] == 'G') G++ ;
- if(s[i] == 'T') T++ ;
- }
- printf("%d %d %d %d\n", A, C, G, T);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement