Write a while loop that repeatedly prompts the user for andtakes input until a value in the range 0 through 15 inclusive isinput. Do not have to include the code that prevents the loop fromcycling indefinitely on input of a wrong data type. The sample ouput: Enter a value in the range 0 through 15inclusive 34 Enter a value in the range 0 through 15inclusive 45 Enter a value in the range 0 through 15inclusive 5 End of the loop Write a while loop that repeatedly prompts the user for andtakes input until a value in the range 0 through 15 inclusive isinput. Do not have to include the code that prevents the loop fromcycling indefinitely on input of a wrong data type. The sample ouput: Enter a value in the range 0 through 15inclusive 34 Enter a value in the range 0 through 15inclusive 45 Enter a value in the range 0 through 15inclusive 5 End of the loop End of the loop
Explanation / Answer
please rate - thanks #include int main() {int n=-1; while(n15) {printf("Enter a value in the range 0 through 15inclusive "); scanf("%d",&n); } printf("End of the loop "); return 0; }