>>937 #include <stdio.h>
#define LEN 128
int main(void)
{
char buf[LEN], *p;
int t, c, a, g;
t = c = a = g = 0;
gets(buf);
p = buf;
while (*p) {
switch (*p) {
case 't': t++; break;
case 'c': c++; break;
case 'a': a++; break;
case 'g': g++; break;
}
p++;
}
printf("Thymine (t) : %d\nCytosine (c) : %d\nAdenine (a) : %d\nGuanine (g) : %d\n", t, c, a, g);
return 0;
}