[CODE]#include <iostream>
using namespace std;
#define N 3
int main(){
int n = 2*N+1;
for (int i = 0,k1 = 1;i < n;++i){
for (int j = 0,k2 = N;j < k1;++j){
cout << k2;
j >= k1/2 ? ++k2 : --k2;
}
cout << endl;
i >= n/2 ? k1-=2 : k1+=2;
}
return 0;
}[/CODE]