I have problem to extract the values from a loop. I will try to explain the problem:
I have a set of 15 cards. every hand is compose of 5 cards.
for each card I found the value of the card using a function that I have implemented.("two"=1, three=2.....king=12,..ace=13)
In the program when I read each line I printthe value of the card.
So my output is like this:
king of clubs
six of clubs
four of diamonds
six of hearts
four of hearts
Now I dont know how to store those values in an array called hand.
For my output above my array should be:
12 5 3 5 3
Can I have some help?
thank you for your time