#include<iostream.h>void print(int w){for(int i=1;i<=w;i++){for(int j=1;j<=i;j++)cout<<i<<" ";cout<<endl;}}
void main(){print(5);}运行结果是12 23 3 34 4 4 4 5 5 5 5 5