#include
void main()
{
int p,m,q,n;
cout<<"enter the number of lines:";
cin>>n;
for(p=1;p<=n;p++)//control row
{
//to print spaces
for(q=1;q<=n-p;q++)
cout<<" ";
//to print numbers
m=p;
for(q=1;q<=p;q++)
{
cout.width(4);
cout<
m=m-2;//the "m=m-2" In this role?
for(q=1;q {
cout.width(4);
cout<
cout<
}
now,I just want to know the role of the variable "m=m-2" in this.
thanks.

VulpesPosted Apr 29, 2012, 5:45 AM
Ken HPosted May 2, 2012, 8:08 AM