ringa_lee2017-04-17 14:41:35
I remember this was an exam question for subject C in my freshman year
阿神2017-04-17 14:41:35
The first empty for( i=1;i<6;i++ )
The second empty for( n=1;n<=11-2i;n++ )
PHP中文网2017-04-17 14:41:35
void main(void)
{
int i,n,j;
for(i=1;i<6,i++)
{
for(j = 1;j<i;j++){
cout<<" ";
}
for(j =0;j<11-2*i;j++){
cout<<"*";
}
for(j = 1;j<i;j++){
cout<<" ";
}
cout<<endl;
}
}
Try it