hand = randperm(52, 5);
suits = ceil(hand ./ 13);
values = mod(hand - 1, 13) + 1;
suit_names = {'sirdīs', 'dimantu', 'klubu', 'lāpstas'};
value_names = {'dūzis ', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'kalps ', 'karalienes ', 'karalis '};
card1 = [value_names{values(1)}, suit_names{suits(1)}];
second_card = [value_names{values(2)}, ' no ', suit_names{suits(2)}];
card_in_the_middle = [suit_names{suits(3)}, value_names{values(3)}];
last_but_end_card = [value_names{values(4)}, ' kažokādu uzvalkā ' suit_names{suits(4)}];
last_but_not_least_card = [value_names{values(5)}, suit_names{suits(5)}];
Best Answer