#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main()
{
	char seq[ 1000 ];
	int  len, i;
	float percent=0.0, GC=0.0;

	printf("Enter a nucleotide sequence: ");
	scanf("%s", seq);
	len = strlen( seq );
	printf("The length is : %d\n", len);

	for( i=0 ; i < len ; i++)
		{
			if( seq[ i ] == 'G' || seq[ i ] == 'C' )
				{
					GC++;
				}
		}
	percent = (100.0 * GC) / len;
	printf("The GC content is %f %%\n", percent);
}
