#include <iostream>
using namespace std;
class name
{
private:
int n;
public:
void member(int p)
{
for(int i=0;i<p;i=i+2)
{
for(int j=i;j<p;j=j+2)
cout<<" ";
for(int k=0;k<=i;k++)
cout<<"0";
cout<<endl;
}
}
};
void tmem(int p)
{
name ob;
ob.member(p);
}
int main()
{
int n;
name ob;
while(cin>>n)
{
tmem(n);
}
return 0;
}
using namespace std;
class name
{
private:
int n;
public:
void member(int p)
{
for(int i=0;i<p;i=i+2)
{
for(int j=i;j<p;j=j+2)
cout<<" ";
for(int k=0;k<=i;k++)
cout<<"0";
cout<<endl;
}
}
};
void tmem(int p)
{
name ob;
ob.member(p);
}
int main()
{
int n;
name ob;
while(cin>>n)
{
tmem(n);
}
return 0;
}
No comments:
Post a Comment