generating random numbers between 1 to 8 for talent of candidate
Random rand = new Random ( ) ; for ( int i = 0 ; i < n ; i ++ ) candidate [ i ] = 1 + rand . Next ( 1 , 8 ) ; Console . Write ( " Candidate ▁ : ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) Console . Write ( i + 1 + " ▁ " ) ; Console . WriteLine ( ) ; Console . Write ( " Talents ▁ : ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) Console . Write ( candidate [ i ] + " ▁ " ) ; printBestCandidate ( candidate , n ) ; } }