Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 4, Problem 41PS
Write a
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Read the user the number of groups (minimum 6)
• For each group: group name and the number of students minimum 10 are entered.
• For each student in a group: grade should be entered, and grade category has to be computed and
printed.
• For each group, the number of student and percent ratio in each grade category should be computed
and printed.
• Finally, the program should print a summary report with the following details:
1. Number of groups.
2. Total number of students and percent ratio of students in each grade category in all groups.
3. The name of the best group which has the maximum percent of students in grade A category and
these students percent ratio.
4. The name of the worst group which has the maximum percent of students in the grade F category and
these students percent ratio.
grade category
А
90–100 %
80-89 %
70–79 %
D
60-69 %
F
< 50 %
ps; this program should not use array and only one main method
IN PYTHON PLEASE AND FLOWCHART DRAWING COMPUTERIZED PLEASE!!
In many businesses across the country, people are buying food and goods using cash. Whenever a purchase is made with cash, it is usual that change must be back to the customer. Business point of sales software help to ensure that the correct change is return to a customer by providing detailed information of the change that should be returned to the customer. using the fewest number of bills and coins.
In this assignment, you are asked to design and implement a program that writes out what bills (ones, fives, tens, twenties) and coins (pennies, nickels, dimes, and quarters) that should be returned to the customer given two inputs from the user:
A total cost of a sale.
The amount that was paid by the customer.
Ensure that your output is grammatically correct.
If the customer does not provide adequate payment, you should print the following statement, the program should end.
Did not receive enough cash from the customer.…
i need the answer quickly
Chapter 4 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
Ch. 4 - Prob. 1PSCh. 4 - The function definition contains the code for a...Ch. 4 - Function calls that return void may not be used as...Ch. 4 - The address operator (&) is used to tell the...Ch. 4 - Variables defined within a block have global...Ch. 4 - Prob. 6PSCh. 4 - Which of the following statements about function...Ch. 4 - Which of the following is not a part of a function...Ch. 4 - Which of the following statements about function...Ch. 4 - Which of the following statements about local...
Ch. 4 - Prob. 11PSCh. 4 - Prob. 12PSCh. 4 - Which of the following statements will generate a...Ch. 4 - Which of the following statements about structure...Ch. 4 - Find any errors in the following function...Ch. 4 - Find any errors in the following function...Ch. 4 - Find any errors in the following function...Ch. 4 - Find any errors in the following function...Ch. 4 - Find any errors in the following function...Ch. 4 - Find any errors in the following function calls:...Ch. 4 - Evaluate the value of the following expressions:...Ch. 4 - Evaluate the value of the following...Ch. 4 - Prob. 23PSCh. 4 - Define the range of the random numbers generated...Ch. 4 - What would be printed from Program 4-17 when run...Ch. 4 - Prob. 26PSCh. 4 - Prob. 27PSCh. 4 - Prob. 28PSCh. 4 - Prob. 29PSCh. 4 - Write a program that generates a random number...Ch. 4 - Prob. 31PSCh. 4 - Code and run Program 4-16, "Top—down Development...Ch. 4 - Prob. 33PSCh. 4 - Prob. 34PSCh. 4 - Expand the calculator program, Program 4-15, to...Ch. 4 - Prob. 36PSCh. 4 - Write a function that receives a positive...Ch. 4 - Prob. 38PSCh. 4 - Prob. 39PSCh. 4 - Prepare a payroll earnings statement for the sales...Ch. 4 - Write a program that, given a beginning balance in...Ch. 4 - The formula for converting centigrade temperatures...Ch. 4 - Write a program that uses standard functions. The...Ch. 4 - Write a C program that creates customers' bills...
Knowledge Booster
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
- (Numerical) Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range 1 to 100. Then determine and display the number of random numbers having values between 1 and 50 and the number having values greater than 50. What do you expect the output counts to be?arrow_forwardWrite a program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate. Step 3: What two things are wrong with the following calculation? (Reference: Variable Assignment and Calculations, page 43 from text book Starting Out with Programming Logic & Design). creditsLeft = creditsTaken – creditsDegreearrow_forwardPython please: Given an integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212. You must use a tuple for this assignment. Additionally, the formatting of the output should match the example below, identifying both the tuple and formatted phone number. For example, if the input is 8005551212 the output is phone_number_tuple: ('8', '0', '0', '5', '5', '5', '1', '2', '1', '2') Formatted phone number: (800) 555-1212arrow_forward
- ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but exactly 4 digits or exactly 6 digits. Your task is to create a function that takes a string and returns true if the PIN is valid and false if it's not. Examples validatePIN("1234") ➞ true validatePIN("12345") ➞ false validatePIN("a234") ➞ false validatePIN("") ➞ false Notes ● Some test cases contain special characters. ● Empty strings must return false.arrow_forwardUsing C++ Write a set of functions that calculate the cost of movie tickets for a family. Using a loop, keep asking: The age of the movie goer. Based on this age, you will charge them these amounts: Under age 3, the ticket is free. If they are between 3 and 12, the ticket is $10.25. If they are over age 12, the ticket is $15.50. If they are 55 or older, the ticket is $12. If they buy at least 4 tickets, they receive a 20% discount. Then, keep a running_total that is output to the screen after each age has been entered. This running_total should be accessed through the functions using a pass-by-reference variable: &running_total The other function parameter variables are to be pass-by-value. Tell them to simply hit the 'Enter' key when they want to stop. Finally, calculate the total cost including a 7.5% sales tax. and output it to the screen. Be sure that the code is broken up into functions with good comments. Put as little code in main() as you can get away…arrow_forwardWrite a C++ program that creates random one month of the temperature and find Average temperature, lowest and hottest temperature with the days of the month. Note: • Create functions that takes the temperatures to find Average temperature, lowest and hottest temperature with the days of the month. • Assume that month has 30 days or use keyboard to enter number of days. • Temperature range 32~100 • You can use static int in function to keep max and min and total Sample output Temperature of a month Days: Temp: Days: Temp: 1 21 16 72 2 65 17 48 3 51 18 75arrow_forward
- Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…arrow_forwardIn Python Please If you roll a pair of dice, you can get anywhere from 2 to 12. Write a program that uses a function to check if the input is a valid number from rolling two dice.arrow_forwardBased on the information on the image below, using python write a program that automates the table used by a surveyor to transform compass headings in degrees (0 to 360 degrees) to compass bearings. The program should require entry of a compass heading and should display the corresponding bearing. Use the information in the table below for the computation of compass bearing.arrow_forward
- IN PYTHON PLEASE AND FLOWCHART DRAWING COPUTERIZED PLEASE!! In many businesses across the country, people are buying food and goods using cash. Whenever a purchase is made with cash, it is usual that change must be back to the customer. Business point of sales software help to ensure that the correct change is return to a customer by providing detailed information of the change that should be returned to the customer. using the fewest number of bills and coins. In this assignment, you are asked to design and implement a program that writes out what bills (ones, fives, tens, twenties) and coins (pennies, nickels, dimes, and quarters) that should be returned to the customer given two inputs from the user: A total cost of a sale. The amount that was paid by the customer. Ensure that your output is grammatically correct. If the customer does not provide adequate payment, you should print the following statement, the program should end. Did not receive enough cash from the customer.…arrow_forwardIn pythonarrow_forwardIn Python or Flowgarithm please. Preferable Python.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY