For example, this is a big 'N' start with 'a' and it's size is 3.
a e bdf c g
Your task is to write different 'N' from size 3 to size 10. The pixel character used is from 'a' to 'z' continuously and periodic('a' is reused after 'z').
Input
Output
Sample Output
Hint
Not all the resultsare listed in the sample. There are just some lines. The ellipsis expresseswhat you should write.
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <iostream>
#include <algorithm>
#include <stack>
#include <set>
#include <map>
#include <string>
using namespace std;
#define pi acos(-1,0)
int main()
{
int size=3;
int i,j;
char s[11][11];
char c='a';
while(size<11)
{
memset(s,' ',sizeof(s));
for(i=1;i<=size;i++)
{
if(i==1 || i==size)
{
for(j=1;j<=size;j++)
{
s[j][i]=c;
if(c=='z')
c='a';
else
c++;
}
}
else
{
s[size+1-i][i]=c;
if(c=='z')
c='a';
else
c++;
}
}
for(i=1;i<=size;i++)
{
for(j=1;j<=size;j++)
{
printf("%c",s[i][j]);
}
printf("\n");
}
size++;
}
return 0;
}