コード例 #1
0
int main(int argc,char **argv)
{
	char *sequence,line[1024];
	int i,seqlength;
	FILE *outfile;

	if(argc!=3)
		return fprintf(stderr,"usage: %s infile outfile\n",argv[0]);

	if(!(sequence=LoadFastaFile(argv[1],0)))
		return fprintf(stderr,"Could not open infile: '%s'\n",argv[1]);
	seqlength=strlen(sequence);

	if(!(outfile=fopen(argv[2],"w")))
		return fprintf(stderr,"Could not open outfile: '%s'\n",argv[2]);

	for(i=seqlength-1;i>=0;i--)
	{
		fprintf(outfile,"%c",Compliment(sequence[i]));
		if((seqlength-i)%60==0)
			fprintf(outfile,"%c",'\n');
	}
	fprintf(outfile,"%c",'\n');

	fclose(outfile);
}
コード例 #2
0
ファイル: Complex.cpp プロジェクト: catlin0123/PaperFolding
Complex Complex::operator!()
{
    return Compliment(); 
}