All pastes #918629 Raw Edit

Pattern

public cpp v1 · immutable
#918629 ·published 2008-02-26 07:32 UTC
rendered paste body
void genpattern(int size){	char temp = 'A';	int incr;	for(int i=0;i<size/2+1;i++)	{		incr=1;		for(int j=size/2+1;j>1;j--)		{			if(j<=i)			{				cout<<" ";				continue;			}			cout<<temp;			temp += incr;		}		if(i==0)			cout<<temp;		else			cout<<" ";		temp -= 1;		incr = -1;		for(j=size/2+1;j>1;j--)		{			if(j<=i)			{				cout<<" ";				continue;			}			cout<<temp;			temp += incr;		}		cout<<endl;		temp = 'A';	}}