TARGET PRACTICE
Patrick and Johnny started to play a new game. The game contains a board which consists of concentric circles. When Patrick correctly hits the center of the concentric circles, his score is equal to target score. The score gets reduced depending on where the players hit on the board. When the players hits outside the board, his score is 0. Johnny will not allow Patrick to have his food unless he reach the target score. The players may take more turns to reach the target score.
Can you write a program to determine the number of turns a player takes to reach the target score of ‘n’ using for loop?
Input Format: Input consists of a list of positive integers. The first integer corresponds to the target score 'n'. Assume that all the other integers input are less than or equal to n.
Output Format: Output consists of a single line. Refer sample output for format details. [All text in bold corresponds to input and the rest corresponds to output.]
Sample Input and Output1: Enter the target score: 100 Enter the scores taken by Patrick in each turn: 4 40 60 The number of turns is 3
Sample Input and Output 2: Enter the target score: 1000 Enter the scores taken by Patrick in each turn: 1000 The number of turns is 1
Problem Requirements: C Keyword Min Count Max Count for 1 1