This program will check for the scores 1-180 whether they are attainable with three darts. This can be implemented with a loop with a loop variable (1-180) which checks for each value of the loop variable if it can be produced with up to three darts. A single dart can produce 43 different scores in the range 1-60. Unfortunately the distribution of the scores over the range is irregular. We would like to use something in the program like "for any score that you can produce with 1 dart do ...". Because the scores are irregular, the best instruction for achieving this is: foreach $variable (list). We will put all the achievable scores with one dart in the list. You can use paper and pencil to compute the numbers of this list but you can also write a Perl program for this task. The program will have a main loop (1-60) in which the loop variable represents target scores. In the loop there will be a second loop (1-20) representing dart scores. In the second loop there should be three tests: first whether the two loop variables are equal to each other, then whether the first is twice the second and third whether the first is three times the second. If one of the tests succeeds then the score represented by the first loop variable can be produced by the dart score represented by the second variable (or its double or its triple). These scores should be printed by the program. These instructions take care of the numbers 1..20. It is also possible to produce 25 and 50. So behind the inner loop (1-20), the program should test if the outer loop variable is 25 or 50 and print this value if this is the case. This program should produce the following list of numbers (compressed for better readability): (1..22,24..28,30,32..34,36,38..40,42,45,48,50,51,54,57,60) Remember that 32..34 stands for 32,33,34. This is the list of numbers which we need in the foreach instructions that represent dart throws. Now we can start with the main program. It will need to output two things: (1) a list of scores which cannot be produced with three or fewer darts, and (2) a count of such scores. For the second task we will keep a counting variable which needs to be initialized at zero at the start of the program. After the initialization of the counting variable, the main score loop (1-180) should start. Within this loop, there will be a loop for each dart throw, a foreach instruction with the list shown earlier with a different loop variable for each loop. The loops should be nested: the loop for the second dart should be inside that of the first and the third should be inside the second. This way we have the values of all darts available inside the third loop. Inside the third loop, we should check if the current score can be produced with the scores achieved with the three darts. There are three possible combinations: the first dart by itself, the sum of the first two darts, and the sum of all three dart scores. If any of these combinations is equal to the target score, the program should immediately continue with the next value of the main loop (1-180). If the program fails to find a combination of dart scores which produce the target score (after the three dart loops have finished) then it should print the current target score with an additional message like "cannot throw: " and increase the counting variable. When all 180 target scores have been checked (after the main loop) then the program should print the value of the counting variable with an additional message like " scores are impossible to achieve". For your information: the number that it should print here is 9.