//@Author Damien Bell
#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int choice=0, i, j;
    
    cout << "How many digits do you want to use: ";
    cin >> choice; 
    
    //One set of loops to count up to 5
    
    for(i=1; i<=choice; i++){//outer loop
        
        for(j=1; j<=i; j++){//inner loop
            
            cout << j; //Cout present counter for J
            
        }//end inner loop
        
        cout << endl; // Line break
        
    }//end outer loop
    
    
    
    //Use another set of nested loops to count down from choice
    
    for (i=choice; i >0; i--){//Outer loop
        
        for(j=1; j<=i; j++){//Inner loop
            
            cout << j ;//output current j
            
        }//end inner loop
        
        cout <<endl;//line break
        
    }//end outer loop
    
    
    
    
    //one set of loops to count down from 5
    
 return 0;
}

/*
 
 
 * 1
 * 12
 * 123
 * 1234
 * 12345
 * 1234
 * 123
 * 12
 * 1
 * 
 
 */