Question: This is a problem of c programming language. Please explain to me how to complete this part. thank you very much indeed Task 1. Asking

This is a problem of c programming language. Please explain to me how to complete this part. thank you very much indeed

This is a problem of c programming language. Please explain to mehow to complete this part. thank you very much indeed Task 1.

Task 1. Asking for the Maximum Number of Stones for Each Turn The first task of the exercise is to write a loop to read the maximum number of stones allowed for each turn. Currently, the code contains only one line and it looks like this: This line of code 'hardcoded' 5 as the maximum number of stones for each turn. In this task, you will replace this line of code by a while loop. This while loop keeps asking for the maximum number of stones for each turn. The loop stops when the maximum number is between 1 to 10 , inclusive. Therefore, the while loop will look like this: do \{ ...ask for the maximum number of stones for each turn... \} (...condition to check if the number is within range...); Here is an example showing you how it works: Please specify the number of stones that can be taken each turn. It should be between 1 and 10:1 Please specify the number of stones that can be taken each turn. It should be between 1 and 10:12 Please specify the number of stones that can be taken each turn. It should be between 1 and 10:1000 Please specify the number of stones that can be taken each turn. It should be between 1 and 10:8 The above example keeps asking for the maximum number of stones for each turn, until the number entered is within the range from 1 to 10 . You can use a simple scanf("\%d", ..) to read the number, assuming that the user (i.e. you) will enter a valid integer into the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!