C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 8.33ASME

(Check Protection) Computers are frequently used in check-writing systems, such as payroll and accounts payable applications. Many stories circulate regarding weekly paychecks being printed (by mistake) for amounts in excess of $1 million. Weird amounts are printed by computerized check-writing systems because of human error and/or machine failure. Systems designers, of course, make every effort to build controls into their systems to prevent erroneous checks from being issued.

Another serious problem is the intentional alteration of a check amount by someone who intends to cash it fraudulently. To prevent a dollar amount from being altered, most computerized check-writing systems employ a technique called check protection.

Checks designed for imprinting by computer contain a fixed number of spaces in which the computer may print an amount. Suppose a paycheck contains nine blank spaces in which the computer is supposed to print the amount of a weekly paycheck. If the amount is large, then all nine of those spaces will be filled—for example:

11,230.60 (check amount)

------------------------

123456789 (position numbers)

On the other hand, if the amount is less than $1,000, then several of the spaces will ordinarily be left blank—for example,

99.87

--------------

123456789

contains four blank spaces. If a check is printed with blank spaces, it’s easier for someone to alter the amount of the check. To prevent such alteration, many check-writing systems insert leading asterisks to protect the amount as follows:

****9987

------------

123456789

Write a program that inputs a dollar amount to be printed on a check and then prints the amount in check-protected format with leading asterisks if necessary. Assume that nine spaces are available for printing an amount.

Blurred answer
Students have asked these similar questions
PLEASE CODE IN PYTHON Problem DescriptionBoring is a type of drilling, specifically, the drilling of a tunnel, well, or hole in the earth. With some recent events, such as the Deepwater Horizon oil spill and the rescue of Chilean miners, the public became aware of the sophistication of the current boring technology. Using the technique known as geosteering, drill operators can drill wells vertically, horizontally, or even on a slant angle. A well plan is prepared before drilling, which specifies a sequence of lines, representing a geometrical shape of the future well. However, as new information becomes available during drilling, the model can be updated and the well plan modified.Your task is to write a program that verifies validity of a well plan by verifying that the borehole will not intersect itself. A two-dimensional well plan is used to represent a vertical cross-section of the borehole, and this well plan includes some drilling that has occurred starting at (0, −1) and moving…
In computer science, what does it imply when you hear the acronym "FDDI"?
ment basic file input/output methods To verify, test, and debug any errors in the code Module learning outcomes assessed by this coursework: On successful completion of this assignment, students will be expected, at threshold level, to be able LO # 5: Software development environments (editor, interpreter, debugger), and programmi using Python programming language. Task: Students are required to create a Python program that performs customized Caesa encryption/decryption, as follows: A- The program should have a main menu, through which the user can choose whether he wants to encrypt a text or decrypt it. B- If the user chose to encrypt plaintext, he will be asked to enter his ID, which is also the name of the input file (i.e. if student ID is 199999, then the input file name should be 199999.txt). The user should not enter the file extension (i.e. .txt), instead, the program should append the extension to the ID automatically. C- The input file must contain the following information:…
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
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Algebraic Expressions – Algebra Basics; Author: TabletClass Math;https://www.youtube.com/watch?v=U-7nq7OG18s;License: Standard YouTube License, CC-BY
Python Tutorial for Beginners 3 - Basic Math, Mathematical Operators and Python Expressions; Author: ProgrammingKnowledge;https://www.youtube.com/watch?v=Os4gZUI1ZlM;License: Standard Youtube License