Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 1.4, Problem 27STE

Suppose you write a program that is supposed to compute the interest on a bank account at a bank that computes interest on a daily basis, and suppose you incorrectly write your program so that it computes interest on an annual basis. What kind of program error is this?

Blurred answer
Students have asked these similar questions
f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…
Suppose you write a program that is supposed to compute the day of theweek (Sunday, Monday, and so forth) on which a given date (like December1, 2014) will fall. Now suppose that you forget to account for leap years.Your program will then contain an error. What kind of program error is it?
An instructor gives a series of exams during the semester in her math class. At the end of the semester she drops each student's lowest test score before averaging the scores. She has asked you to design a program that will read a student's test scores as input and calculate the average with the lowest score dropped. Here is the algorithm that you developed: Get the student's test scores. Calculate the total of the scores. Find the lowest score. Subtract the lowest score from the total. This gives the adjusted total. Divide the adjusted total by 1 less than the number of test scores. This is the adjusted average. Display the average. The test scores are in a text file named scores.txt and contains the following: Mickey, 71.0, 42.0, 83.0 Donald, 94.0, 73.0, 72.0, 81.0 Minnie, 95.0, 85.0, 45.0, 55.0, 65.0 A sample run is as follows: Enter a file containing floating point numbers: scores.txt Test scores for Mickey: ['71.0', '42.0', '83.0'] Removed the lowest score of 42.0 for Mickey The…

Chapter 1 Solutions

Problem Solving with C++ (9th Edition)

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++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Introduction to Operators in C; Author: Neso Academy;https://www.youtube.com/watch?v=50Pb27JoUrw;License: Standard YouTube License, CC-BY