Flag used to remove starting zeros
bool zeroflag = false ; for ( int i = 0 ; i < vec . Count ; i ++ ) { if ( vec [ i ] == 0 && zeroflag == false ) { continue ; } zeroflag = true ; Console . Write ( vec [ i ] ) ; } return ; }