One more in the row... hope this time it is good...
- Sumit
Code:#include<iostream> using namespace std; int main() { int a, b, c, x; cout<<"Please input the number: "; cin>>x; for(a=1;a<=x;a++) { for(b=1;(x-b)>=a;b++) cout<<" "; for(c=1;c<=a;c++) cout<<c; for(b=1;b<a;b++) cout<<(a-b); cout<<endl; } }