Problem 1. Construct a Flowchart Diagram, Pseudocode and write a C++ program that applies bonus scores to given scores in the range [1.9]. The program reads a digit as an input. If the digit is between 1 and 3, the program multiplies it by 10; if it is between 4 and 6, multiplies it by 100; if it is between 7 and 9, multiplies it by 1000. If it is zero or if the value is not a digit, the program must report an error. Create two program versions, one that uses a switch statement and the other one uses nested if-else statement and at the end print the calculated new value in the console.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section: Chapter Questions
Problem 1PP: (General math) a. Design, write, compile, and run a C++ program that calculates and displays the...
icon
Related questions
Question

Construct a flowchart diagram, pseudocodes and write a C++ program

Problem 1. Construct a Flowchart Diagram, Pseudocode and write a C++
program that applies bonus scores to given scores in the range [1.9]. The program
reads a digit as an input. If the digit is between 1 and 3, the program multiplies it
by 10; if it is between 4 and 6, multiplies it by 100; if it is between 7 and 9, multiplies
it by 1000. If it is zero or if the value is not a digit, the program must report an error.
Create two program versions, one that uses a switch statement and the other one
uses nested if-else statement and at the end print the calculated new value in
the console.
Transcribed Image Text:Problem 1. Construct a Flowchart Diagram, Pseudocode and write a C++ program that applies bonus scores to given scores in the range [1.9]. The program reads a digit as an input. If the digit is between 1 and 3, the program multiplies it by 10; if it is between 4 and 6, multiplies it by 100; if it is between 7 and 9, multiplies it by 1000. If it is zero or if the value is not a digit, the program must report an error. Create two program versions, one that uses a switch statement and the other one uses nested if-else statement and at the end print the calculated new value in the console.
Expert Solution
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr