• Source
    1. #include <iostream>
    2.  
    3. using namespace std;
    4.  
    5. int main()
    6. {
    7. for (int q=0; q<10; ++q)
    8. {
    9. for (int w=0; ; ++w)
    10. {
    11. cout << (char)(q ? q+'0' : ' ') << (char)(w+'0');
    12. if (q == w) break;
    13. cout << ' ';
    14. }
    15.  
    16. cout << endl;
    17. }
    18. }