question archive Conduct a mathematical analysis on the code snippet below: for (int counter = 0; counter < 5; counter++) { System
Subject:Computer SciencePrice: Bought3
Conduct a mathematical analysis on the code snippet below:
for (int counter = 0; counter < 5; counter++)
{
System.out.print("Redraw card " + (counter + 1) + "?" +" (1 for yes, 0 for no)");
int answer = scan.nextInt();
if (answer == 1)
{
hand[counter] = player.redraw(counter, deck);
}
}
deck.refreshDeckPosition();
return hand;
}