Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 2DE

Why does the following pseudocode not perform as indicated in the comments?

// This program gets a dollar amount from the user

// and validates the input.

Declare Real amount

// Get the amount from the user.

Display "Enter a dollar amount"

Input amount

// Make sure the amount is not less than zero. If it is,

// get a new amount from the user.

While amount < 0

Display "ERROR: The dollar amount cannot be less than 0."

Display "Enter a dollar amount."

End While

Blurred answer
Students have asked these similar questions
2) Write pseudocode that performs the following: Ask a user to enter a number. If the number is between 0 and 10, write the word "blue". If the number is between 10 and 20, write the word "red". If the number is between 20 and 30, write the word "green". If it is any other number, write that it is "not a correct color option".
Why does the following pseudocode not perform as indicated in the comments? // This program gets a dollar amount from the user // and validates the input. Declare Real amount // Get the amount from the user. Display "Enter a dollar amount" Input amount // Make sure the amount is not less than zero. If it is, // get a new amount from the user. While amount < 0 Display "ERROR: The dollar amount cannot be less than 0." Display "Enter a dollar amount." End While
Remaining Time: 54 minutes, 49 seconds. * Question Completion Status: QUESTION 19 Write a Java program that prompts the user to enter the School Grade Level of a student and then calculate their discount amount in the regular fees structure offered during this pandemic situation. By using the below table, calculate their discount amount from the amount of the regular fee and then print the discount amount in OMR by using the appropriate selection structure. (Assume the user is entering a maximum Grade level is 12) discount amount = Regular Fees * percentage of discount rate School Grade Level Regular Fees in OMR Discount Rate >9 and 6 and 3 and 0 and <=3 30.500 5% otherwise 20.400 No discount T T T Arial 3 (12pt) v T -E E- 只i ン Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers TOSHIBA F5 F6 F7 F8 F9 F10 F11 F12 INS SCNULL LOCK AD & 67 7 V 8A9 4 0

Chapter 7 Solutions

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY