Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
bartleby

Concept explainers

Question
Book Icon
Chapter 6, Problem 3E
Program Plan Intro

Program Plan:

  • Include required header files.
  • Declare the function “main ()”.
    • Declare required variables “ratingCounters [11]”, “i”, “j”, “response”.
    • Loop from 1 through 10.
      • Assign “0” to the array index.
    • Do until the “while” condition “response!=999” fails.
      • Get the response from the user.
      • Check the condition “response < 1 || response > 10”.
        • Print the error message.
      • Else, increment the counter.
      • Increment the variable “i”.
    • Loop from 1 through 10
      • Print the number of responses.
    • Return the statement.

Blurred answer
Students have asked these similar questions
Implement programs involving the use of while, do..while and for loop statement. Objectives: Topics Covered: Implementing programs using loops. Description FRIDAY THE 13TH When will Friday the 13th occur in 1990? Write a program that will find all months in 1990 in which the 13th falls on a Friday. You need to know the following. 1. January 1, 1990 was on a Monday. 2. September, April, June, and November have thirty days, all the rest have 31 except for February which has 28 except in leap years when it has 29. 3. 1990 is not a leap year. Note: To make it fair for everyone, you may not use any built-in date functions from your computer language. Sample Output if Applicable Sample Run In 1990, Friday the 13th occurs in the months: APRIL
A semicolon (;) is necessary at the end of which type of the loop?       All loops     do-while       while     for
Write the syntax for a do/while loop that executes as long as a character variable has a value of either “y” or “Y”. (Assume the character variable is already declared, and give it a valid identifier name of your choosing, given that its purpose is to store the user’s response to the question “do you wish to input another set of data?”. You do not need to include any statements in the curly brackets for the loop.) (** How do I do this in c**)
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning