Write a program that given an amount of change less than $1.00 will print out exactly how many quarters, dimes, nickels, and pennies will be needed to efficiently make that change. [Hint: the // operator may be useful.]
Q: Write a program that reads in three integers and then determines and prints the largest and the…
A: Program approach:- Using the necessary header file. Display 3 inputs with the largest input…
Q: You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function.…
A:
Q: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the…
A: Given: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based…
Q: A mobile phone service has three different data plans for its customers: PLAN A: For $19.99…
A: Note: - Since the programming language is not mentioned to write the program. The below code is…
Q: A parking garage charges a $20.00 minimum fee to park for up to three hours. The garage charges an…
A: Sample Response: //C++ programming language, tested on CodeBlock IDE#include…
Q: C++ One way to create a pseudo-random three digit number (and we are including one- and two-digit…
A: Code: #include <iostream>#include <cstdlib>#include <ctime>using namespace std;…
Q: CODE USING C++ Did you know that in lotteries, a 3-digit number with the same numbers in all digits…
A: Given a number, modulo operator can be used to extract digits of the number. A modulo operator…
Q: I am stuck on this problem- this is the question: Meadowdale Dairy Farm sells organic brown eggs to…
A: Note: Below is the required program in java language. Programming Approach: Importing necessary…
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits.…
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the…
Q: Write a program that reads the employe name and base salary and then calculat
A: #include <iostream>using namespace std; int main(){ int base_salary; string name; // input…
Q: Write a program that prints the insurance fee to pay for a pet according to the following rules:…
A: //note no programming language is mentioned so i was c++ programming to solve this…
Q: program that reads an integer and prints how many digits it has
A: Required code (using java programming language) :- //import util packageimport…
Q: PROBLEM: Write a program that prompts the user to input first name, middle initial, and last name…
A: The C++ code implementation is given below. All the 5 cases are taken into consideration. The spaces…
Q: Write a program that computes and displays the charges for a patient's hospital stay. First, the…
A: Program: // Header files section#includeusing namespace std; //Functions prototypesdouble…
Q: The body mass index, BMI, is a measure used to determine if a person is overweight or not. We can…
A: Prompt the user to enter their weight in pounds Read the user's weight input and store it in a…
Q: A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an…
A: Steps/Algo: Ask the user to enter the number of hours parked. Calculate charges using the…
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Since you haven't mentioned the programming language, we are answering this in C#.
Q: Airline companies apply baggage restrictions for their passengers. An airline company has decided to…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: positive
A: Introduction Here we will provide a sample of a program where we can rectify whether the result is…
Q: Write a program to read basic salary (bsalary) and sales (sales) then calculate and print the net…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: g., Smith) Number of hours worke
A: import java.util.Scanner;public class Main { public static void main(String[] args) {…
Q: Write a method named presentValue that performs this calculation. The method should accept the…
A: We know that the amount we get for a principal P after t years is P + PTR/100 So, according to the…
Q: Exercise III: Catalan numbers For n e N, denote by c, to be the number of ways to form a "mountain…
A: Answer: Our guidelines is answer the first three question from the first question. I have given…
Q: Write a program that calculates and prints bills for the city power company. The program should…
A: Algorithm: Get the account number as user input As long as the code is not valid, keep asking the…
Q: Write a program that invites the user to enter two numbers: a dividend (the top number in a…
A: According to the Question below the Solution: Output:
Q: rite a program to find the 6-th Monisen number. Classic Programming Question: find the n-th Monisen…
A: Required: Write a program to find the 6-th Monisen number. Classic Programming Question: find the…
Q: Given the sample code above in generating a random number. Create a program that lets the user play…
A: According to the information given:- We have to create rock paper and scissor game on the basic of…
Q: Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we…
A:
Q: Q3, A lecturer intends to separate his students into 2 groups based on their INDEX Numbers, those…
A: Multiple question asked answering Q3, repost the remaining. Code: //header file #include…
Q: u arrive in front of a bridge that you must cross to reach a village before dark. Crossing the…
A: Q: Code the given problem
Q: 6. A palindrome is a number or text phrase that reads the same backwards or forwards. For example,…
A: PROGRAM INTRODUCTION: Include the required header files. Start the definition of the main function.…
Q: Write a program that reads from the user a character (ʻq’ or 'c'). If the character is 'c', the…
A: int main() { printf("enter the character :"); scanf("%c" &a); if(a=='c') { int r; scanf("%d",…
Q: A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $1 per…
A: #include <stdio.h>#include <stdlib.h> double calculateCharges(double hours) { double…
Write a
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- 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…A 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.50Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.
- 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.…A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $1 per hour for each hour or part thereof over four 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 will calculate and print 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 calculate Charges to determine the charge for each customer.You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function. #include <time.h> now = time(NULL); // now is more than a billion seconds (which data type should you use?) Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with the number of seconds that have passed. The number of months must be less than 12, i.e., take out how many years have gone by first, then how many months are left, then weeks, etc. Assume that all years have 365 days, and all months have 30.42 days. Don’t use a calculator, or any web site that reports the number of seconds in a month, etc. – your C program can calculate anything that you need. Notice that this is an assignment on using arithmetic in C. Hints. How many seconds are in a minute? hour? A day? A week? A month? A year?
- do it fastAirline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderCan answer the task below?
- The body mass index, BMI, is a measure used to determine if a person is overweight or not. We can calculate BMI from the weight of the person (in pounds) and the height (in inches) of the person.The formula for calculating BMI is:BMI = (weightInPounds * 703) divided by (heightInInches squared)In this problem, you will develop a Java program as a BMI calculator, that reads the user’s weight in pounds and height in inches, then calculates and displays the user’s body mass index BMI. Also, display the following information {from the US Department of Health} so the user can evaluate his/her BMI:BMI values:Underweight: less than 18.5Normal: between 18.5 and 24.9Overweight: between 25 and 29.9Obese: 30 or greaterProblem 7: Guess the price of the car!? You will implement a variant of the number guessing game we played in lecture. In this variant, you will ask the user to guess the price of a $42,500 car. Let's assume that the player knows the price of the car is rounded to the nearest $500. If a player's guess is not exactly correct, your program will tell them they are either too high or too low. The player will get as many guesses as they need to guess the price of the $42,500 car. However they will only win the game if they used 5 or fewer guesses. Here are two examples of how the program should work for both cases: Guess the price and win the prize! Enter your guess:50000 Too high! Enter your guess:40000 Too low! Enter your guess:45000 Too high! Enter your guess:42500 You won the car! Guess the price and win the prize! Enter your guess:46000 Too high! Enter your guess:45000 Too high! Enter your guess:44000 Too high! Enter your guess:43000 Too high! Enter your guess:42000 Too low! Enter your…6. A palindrome is a number or text phrase that reads the same backwards or forwards. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write a program that reads a 5 digit integer and determines whether it is a palindrome. Hint: One way to do this is to use division (/) and modulus (%) operators to separate the number into individual digits.