EBK STARTING OUT WITH PROGRAMMING LOGIC
EBK STARTING OUT WITH PROGRAMMING LOGIC
4th Edition
ISBN: 8220100659386
Author: GADDIS
Publisher: PEARSON
Question
Book Icon
Chapter 11, Problem 7PE
Program Plan Intro

The speed of the sound

Program Plan:

  • Include the required header files.
  • Define the main(),
    • Declare the required variables.
    • Display the menu options on the screen.
    • Get the choice from the user.
    • Using switch case,
      • Validate the user choice
        • Case 1:
          • Set the corresponding speed for “Air”.
          • Get the number of seconds that the sound travels.
          • Calculate the total distance amount.
        • Case 2:
          • Set the corresponding speed for “Water”.
          • Get the number of seconds that the sound travels.
          • Calculate the total distance amount.
        • Case 3:
          • Set the corresponding speed for “Steel”.
          • Get the number of seconds that the sound travels.
          • Calculate the total distance amount.
        • Case 4: Exit the program.

Blurred answer
Students have asked these similar questions
Tuition Increase At one college the tuition for a full-time student is $6000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Create an application with a loop that displays the projected semester tuition amount for the next 5 years in a ListBox control.
A custom tailor offers a variety of custom suit options to customers.  The company has tasked you with creating a program that will allow tailors to enter information about the kind of material used to make the customer's custom suit and the number of square yards used to make the suit and will determine the total cost to charge the customer. Use the following steps to create the program: The program should display a menu that asks the technician to select the type of material that was used.  Make sure the menu is formatted exactly as in the Sample Input and Output of the instructions (including indentation).   The program should determine the cost per square yard of the material.  The cost per square yard is determined based on the type of material that is used. Table 1: Type of Material and Cost per Square Yard   The program should then ask the tailor to enter the number of square yards of material that they used to make the custom suit.   Calculate the material cost, which…
Program Description A custom tailor offers a variety of custom suit options to customers. The company has tasked you with creating a program that will allow tailors to enter information about the kind of material used to make the customer's custom suit and the number of square yards used to make the suit and will determine the total cost to charge the customer. Use the following steps to create the program: 1. The program should display a menu that asks the technician to select the type of material that was used. Make sure the menu is formatted exactly as in the Sample Input and Output of the instructions (including indentation). I 2. The program should determine the cost per square yard of the material. The cost per square yard is determined based on the type of material that is used. Table 1: Type of Material and Cost per Square Yard Type of Material Cost per Square Yard Satin $8.95 Linen $9.65 Leather Silk $18.45 $28.99 3. The program should then ask the tailor to enter the number…

Chapter 11 Solutions

EBK STARTING OUT WITH PROGRAMMING LOGIC

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education