generating random numbers between 1 to 8 for talent of candidate
srand ( time ( 0 ) ) ; for ( int i = 0 ; i < n ; i ++ ) candidate [ i ] = 1 + rand ( ) % 8 ; cout << " Candidate ▁ : ▁ " ; for ( int i = 0 ; i < n ; i ++ ) cout << i + 1 << " ▁ " ; cout << endl ; cout << " ▁ Talents ▁ : ▁ " ; for ( int i = 0 ; i < n ; i ++ ) cout << candidate [ i ] << " ▁ " ; printBestCandidate ( candidate , n ) ; return 0 ; }