EBK C PROGRAMMING:
8th Edition
ISBN: 9780357156025
Author: Malik
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 4, Problem 17PE
Samantha and Vikas are looking to by a house in a new development. After looking at various modelsm the three models they like are colonial split-entry, and single-story. The builder gave them the base price and the finished area in square feet of the three models. The want to know the model(s) with the least price pler square foot. Write a
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Write a program that computes the cost of painting and installing carpet in aroom. Assume that the room has one door, two windows, and one bookshelf. Your program must do the following:a. Prompts the user to enter, in feet, the length, width, and height of aroom. Read the dimensions of the room.b. Prompts the user to enter the widths and heights, in feet, of the door,each window, and the bookshelf. Read these quantities.c. Prompts the user to enter the cost, per square foot, of painting thewalls. Read these quantities.d. Prompts the user to enter of cost, per square foot, of installing carpet.Read these quantities.
write a program to calculate electricity bill charged to a consumer.Ask him to enter the unit consumed.for all units less than or epual to 200,each unit is to be charged at RS.2.if unit is greater than 200 and less than or equal to 400, first 200 units is to be charged at RS. 2 and other units is charged at Rs. 4. Each unit more than 400 will be charged at RS. 5.
Write a program that takes your full name as input and displays the abbreviations ofthe first and middle names except the last name which is displayed as it is. Forexample, if your name is Robert Brett Roser, then the output should beR.B.Roser.
Chapter 4 Solutions
EBK C PROGRAMMING:
Ch. 4 - Prob. 1TFCh. 4 - Prob. 6SACh. 4 - Prob. 12SACh. 4 - Write a program that prompts the user to input a...Ch. 4 - Write a program that prompts the user to output an...Ch. 4 - Prob. 4PECh. 4 - In a right triangle, the square of the length of...Ch. 4 - Write a program that mimics a calculator. The...Ch. 4 - Redo Exercise 8 to handle floating-point numbers....Ch. 4 - The number of lines that can be printed on a paper...
Ch. 4 - The short-term, 0-24 hours, parking fee, F, at an...Ch. 4 - Write a program to implement the algorithm that...Ch. 4 - Samantha and Vikas are looking to by a house in a...Ch. 4 - One way to determine how healthy a person is by...Ch. 4 - Ron bought several acres of farm to grow and sell...Ch. 4 - The cost of renting a room at a hotel is, say...Ch. 4 - Let l be a line in the x-y plane. If l is a...Ch. 4 - The first 11 prime integers are 2, 3, 5, 7, 11,...
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
- A parking garage charges a $20.00 minimum fee to park for up to three hours. The garage charges an additional $5.00 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24- hour period is $50.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and printsthe parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format: Car Hours Charge1 1.5 20.002 4.0…arrow_forwardJim works at a food bank and is trying to schedule the volunteers. He has three volunteers. The volunteers that is available for the maximum number of hours will be provided the morning shift, the volunteer that provides the second maximum number of hours will be given the afternoon shift and the volunteer that can work the least number of hours will be given the night shift. Write a program that takes the input of the volunteers' names and an available number of hours and determines what shift they have been assigned. If two volunteers enter the same hours, then you can choose your own criteria to break the tie. Your program must work as follows: fallafali-virtual-machine: volunteer 1 please enter your nane : Jlm$./labz Jolunteer 1 please enter your nane 4 inm Volunteer 2 please enter of hours you can volunteer : 6 Kolunteer 2 please enter your nane : Kim Koly please enter nurber of hours you can volunteer : 8 Volunteer 3 please enter your nane : Sam Sam please enter nurber of hours…arrow_forwardA contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be, say, four inches thick. The length of the patio is to be, say, twice the width. Write a program that prompts the user to specify the amount of premixed concrete (in cubic yards) ordered, the thickness of the patio (in inches), and the ratio of length and width. The program then outputs the length and width of the patio (in feet). (1 cubic yard 5 27 cubic feet.) (To find the square root of a decimal number, include the header file cmath using the statement #include <cmath>, in your program. The function sqrt, included in this header file, determines the square root of a decimal number. For example, sqrt(16.0) = 4.0.)arrow_forward
- i need the answer quicklyarrow_forwardWrite a program that calculates the attendance percentage for students, there are total 120 working days in a semester, you are required to ask 100 students the days they attended university, then calculate the percentage it makes. If the percentage is above 75, then display that he is eligible to sit in examination, if not display that he will not get admit card to sit in exams. In the end calculate how many students were eligible to sit in exams.arrow_forwardThere will be voting in a country. In this voting, the voting of those under 17-years-old or over 80-years-old will be invalid. Write a program that asks the user for their age. This program will give you if the vote is valid.arrow_forward
- An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges. Requirements: Please include a Flowchart and the pseudocode for your program and use Visual Basicarrow_forwardAn Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges. Using Visual Basic I need help finishing this code this is what I got so far Dim decpackageA As DecimalDim decpackageA1 As DecimalDim decpackageB As DecimalDim decpackageB1 As DecimalDim decpackageC As DecimalDim inthours_worked As IntegerDim dectotal_chargespackageA As DecimalDim dectotal_chargespackageB As DecimalDim dectotal_chargespackageC As DecimalDim dbltotal_charges As Double 'Assign the textbox…arrow_forwardWrite a program that will ask a user to input grades in Integral Calculus, Computer Programming and Physics. A grade of greater than or equal to 70 means PASSED and a grade of below 70 means FAILED. If the user has a rating of PASSED from all three subjects, the program must return a status of REGULAR. If the user has only one FAILED rating, the program must return a status of PROBATIONARY and if the user has two or more FAILED rating, the program must return a status of DISMISSED. Assume that the user will only input numerical values for their grades. 1. Type the following code on your Python script. 1 integral_calc = float(input('Input your grade in Integral Calculus: ')) 2 phys=float(input('Input your grade in Physics: ')) 3 comp_prog=float(input('Input your grade in Computer Programming: ')) 4 if (integral_calc >= 70 and phys >= 70 and comp_prog >= 70): 5 print('Congratulations, you are REGULAR!") 6 elif((integral_calc < 70 and phys < 70) or (integral_calc<70 and comp_prog < 70) or…arrow_forward
- A contractor orders, say, 30 cubic yards of premixed concrete toconstruct a patio that is to be, say, four inches thick. The length ofthe patio is to be, say, twice the width. Write a program that promptsthe user to specify the amount of premixed concrete (in cubic yards)ordered, the thickness of the patio (in inches), and the ratio of lengthand width. The program then outputs the length and width of thepatio (in feet). (1 cubic yard = 27 cubic feet.) (To find the squareroot of a decimal number, include the header filecmathusing thestatement#include, in your program. The functionsqrt, includedin this header file, determines the square root of a decimal number.For example,sqrt(16.0) = 4.0.)arrow_forwardAn Internet service provider has three different subscription packages for its customers:Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00per hour.Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00per hour.Package C: For $19.95 per month unlimited access is provided.Write a program that calculates a customer’s monthly bill. It should ask the user to enter theletter of the package the customer has purchased (A, B, or C) and the number of hours thatwere used. It should then display the total charges. Please program in C++ Requirements: Please include a Flowchart and the pseudocode for your programarrow_forwardA parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and prints the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format Sample output Enter the hours parked for 3 cars: 1.5 4.0 24.0 Car Hours Charge 1 1.5 2.00 2 4.0 2.50 3 24.0 10.00 TOTAL 29.5 14.50arrow_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