A. Prompts the user to enter the total amount of milk (in liters) produced in the morning. B. Outputs the number of milk cartons needed to hold milk (Round your answer to the nearest integer). C. Outputs the cost of producing milk. D. Outputs the profit for producing milk.
Q: After the information is entered for each floor, the program calculates the following: - Hotel…
A: do while is a loop that check condition at the exit time Syntax do { //statements to be executed…
Q: Write a program to increase the salary depending on the number of hours of work per day as follows:…
A: Given: Write a program to increase the salary depending on the number of hours of work per day as…
Q: 5. The user will input a Philippine amount, then the said amount will be converted to different…
A: Get Phillipine peso input from user. Calculate currency amount's equivalence using the formula (1…
Q: Let p = "Paris is called the City of Lights" and let q = "The Eiffel Tower is located in Paris".…
A:
Q: A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a…
A: Here ,the calculation is done as:
Q: Read and understand the following problem: 1. Write a program that accepts from the user an…
A: Suppose the user entered 100 Peso. Given: 1 HK dollar = Php 6.51 ⇒ 1 Php = 1/6.51 HK dollar…
Q: Use Python Write a program to prompt the user for hours and rate per hour to compute gross…
A: Answer: Program:- #!/bin/python3 #it is python version (no need to write) Hours=int(input("Enter…
Q: A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a…
A: EXPLANATION: - The variables in C++ need to declared prior to using it. Also, it is advised to…
Q: write a programm to calculate housing insurance? use this formula: X/150*y/s*50 x is the total…
A: The problem is based on the basics of arithmetic operations in programming languages. NOTE: The…
Q: 1- Write a program to enter average and find the grade rating() (Excellence, Very good, Good,…
A: NOTE NO PROGRAMMING LANUAGE IS MENTIONED SO I WAS USED C++ LANGUAGE 1) #include…
Q: Assuming that all residents are given the first 1000L of water for free by the municipality, then…
A: //code in c program #include<stdio.h>#include<conio.h> int main() { const price=2; int…
Q: program that takes an integer as the number of minutes and outputs the total hours and minutes (90…
A: Given 90 minutes = 1 hour 30 minutes To do the given program.
Q: iii) Read input a positive integer from the user and print "Yes, all digits are equal." if all the…
A: Write a program in PHP language to read input a positive integer from the user and print “Yes, all…
Q: Write a program, which: inputs 50 numbers outputs how many of the numbers were > 100 langiage C#
A: #include <stdio.h> int main(){ int x, i, sum=0; x=0; int A[50]; printf("Input 50…
Q: 28. If originally x=4, what is the value of x after the evaluation of the expression: x+=4
A: Given, x = 4. The value of x after the evaluation of the expression: x+=4 is 8.
Q: Using C++, write a program that will check the employees years in service and office. The user will…
A: Given: Using C++, write a program that will check the employees years in service and office. The…
Q: Write a program to enter the length and width of a rectangle and the radius of a circle. Assume the…
A: Start Input length Input width Input radius Calculate Area of Rectangle - Area of Square Display the…
Q: program so that the user enters the rate of tuition increase for the first year. the rate then…
A: C++ used to answer this question
Q: Q2a) A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk…
A: 2a) The code is given below: #include <iostream>#include <iomanip> using namespace…
Q: You are required to write a program that compute a workers gross pay, the deductions and his/her net…
A: DONE IN C++ PROGRAMM
Q: Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time…
A: Note: As no language is mentioned, therefore answering the given question in python. Input : age…
Q: Question 1 Write a program that asks the user to enter the number of passengers in an airplane and…
A: "Since you have not mention any programming language, so will write our program in C language." C…
Q: Write the program that will ask the user to enter a positive integer, then determine and show the…
A: Program is in C language to show number of digit in that integer :- #include <stdio.h>int…
Q: 5. The user will input a Philippine amount, then the said amount will be converted to different…
A: We need to write a C language program that reads input from the user for currency in Philippine peso…
Q: 4. Write a program that computes the employee's payroll of ABC Company. The user is first asked to…
A:
Q: 2)write program that input three number and find the minimum number? 3)write program that input…
A: Main algorithm:- if(a<b && a<c) cout<<a<<" is minimum "; else…
Q: 1. A software company sells a package that retails for $99. Quantity discounts are given according…
A: logic:- take quantity as user input. apply if else to find out discount. at last subtract…
Q: What is the output of the following code segment? int num= 20, y = 5, x; cin>>X; if (x >= 2*num)…
A: Code: #include <iostream>using namespace std;int main(){ int num= 20, y = 5, x;…
Q: Write a program which input radius of circle and compute area of it. Then input the length of side…
A: EXPLANATION - Create a program . Declare three variable radius , length , area1 , area2 . Take…
Q: Write a program that allows the user to input their weight in, height in feet, age in years, and…
A: Body mass index is a person's weight in kilograms divided by the square of height in meters.
Q: Suppose income is 4001, what is the output of the following code? if (income > 3000) {…
A: The conditional statement if/else is used to check whether the condition is true or false. Syntax:…
Q: Drive the whether following statements are true or false: P(x,y): 2x+2y=4 where x= {0,1,-1}, y=…
A: Statements true and false
Q: Write a program using else if to input the number of students(stu) and number of teachers(tea) in…
A: C used to answer this question
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Program: #definition of main function if __name__ == '__main__': #get the inputs data =…
Q: Write a program that prompts the user to enter an integer and determines whether it is divisible by…
A: Since there is no programming language, below is the program in python.
Q: Cody wants to know if the Programmer's dad is a senior citizen. A person is considered a senior…
A: Algorithm: 1. Read age as age. 2. Print "age". 3. IF age >= 60 Then: Print "Senior Citizen".
Q: C++ Programming Exercise: Ther are 50 apartment units. When the rent is $600 per month, all the…
A: #include <iostream>using namespace std;#include<fstream>int main (){double rent,…
Q: decrease each of the next month’s bills by 10%. The city also levies a 3%utility tax, which is to…
A: Given: electricity cost per kilo watt is : 25.50Â utility tax is 3 % cost per kilo wat = 25.50 Â…
Q: If a=5,b=30.2 then a+b =??
A: given data If a=5,b=30.2 then a+b =??
Q: write a program that enters the names of ten countries, then for each
A: code for v = 1:1:10 prompt = 'Enter the name of '; country = input(prompt, 's')…
Q: The following statement should determine if x is not greater than 50. What is wrong with that?…
A: Given statement is if (!x>50) Here the need is to determine if x is not greater than 50 An if…
Q: If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of…
A: Step 1:- Program Approach:- 1.Include header file 2.Create the function whose name is year(int num)…
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: Find the required code given as below and sample output :
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be…
A: Please find the answer below :
Q: After the following statements, what are the values of x and y? * x - 15 y = x x - 22 O x is 15 and…
A: After the following statements, what are the values of x and y? * x = 15 y = x x = 22 O x is 15…
Q: Suppose income is 4001, what is the output of the following code? if (income > 3000) {…
A: The answer of this question is as follows:
Q: Write a program that prompts the user to enter the number of students and each student’s score, and…
A: Given:- Write a program that prompts the user to enter the number of students and each student’s…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program that tells what coins to give out for any amount of changefrom 1 cent to 99 cents. For example, if the amount is 86 cents, the outputwould be something like the following:86 cents can be given as3 quarter(s) 1 dime(s) and 1 penny(pennies)Use coin denominations of 25 cents (quarters), 10 cents (dimes), and1 cent (pennies). Do not use nickel and half-dollar coins. Your programwill use the following function (among others):void computeCoins(int coinValue, int& num, int& amountLeft);//Precondition: 0 < coinValue < 100; 0 <= amountLeft < 100.//Postcondition: num has been set equal to the maximum number//of coins of denomination coinValue cents that can be obtained//from amountLeft. Additionally, amountLeft has been decreased//by the value of the coins, that is, decreased by//num * coinValue For example, suppose the value of the variable amountLeft is 86. Then,after the following call, the value of number will be 3 and the value ofamountLeft will be 11…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.)C++ OOP A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons ofmilk to a local grocery store. The cost of producing one liter of milk is $0.38, and theprofit of each carton of milk is $0.27. Write a program that does the following:• Prompts the user to enter the total amount of milk produced in the morning.• Outputs the number of milk cartons needed to hold milk. (Round your answer tothe nearest integer.)• Outputs the cost of producing milk.• Outputs the profit for producing milk.
- Write a program that calculates the energy neededto heat water from an initial temperature to a final temperature. Your programshould prompt the user to enter the amount of water in kilograms and the initialand final temperatures of the water. The formula to compute the energy isQ = M * (finalTemperature – initialTemperature) * 4184where M is the weight of water in kilograms, initial and final temperatures are indegrees Celsius, and energy Q is measured in joules. Here is a sample run: Enter the amount of water in kilograms: 55.5Enter the initial temperature: 3.5Enter the final temperature: 10.5The energy needed is 1625484.0WRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF 10% IS APPLIED TO IT. WRITE A PROGRAM TO CALCULATE THE SIMPLE INTEREST ON A LOAN AMONUT OF 50000 GHANA CEDIS AT AN INTEREST RATE OF 30% FOR A NUMBER OF YEARS WHICH WILL BE SPECIFIED BY THE USER. WRITE A PROGRAM TO CALCULAT THE AGE OF THE USER AFTER THE USER ENTERS HIS OR HER YEAR OF BIRTH.Write a program that asks the user to enter a number of seconds.Solving the Time Calculator ProblemThere are 86400 seconds in a day. If the number of secondsentered by the user is greater than or equal to 86400, thethe program should display the number of days in that manyseconds.There are 3600 seconds in an hour. If the number of secondsentered by the user is less than 86400 but is greater than orequal to 3600, the program should display the number of hoursin that many seconds.There are 60 seconds in a minute. If the number of secondsentered by the user is less than 3600 but is greater than or equalto 60, the program should display the number of minutes in thatmany seconds
- Write a program which prompts the user for the number of rooms to be cleaned and the sizes of the room. The cost of cleaning is calculated using a minimum room size of 10 x 12 at a cost of RM39. All rooms larger than 10 x 12 are charged RM0.25 per square footGiven a directed line from point p0(x0, y0) to p1(x1,y1), you can use the following condition to decide whether a point p2(x2, y2) is onthe left of the line, on the right, or on the same line.Write a program that prompts the user to enter the three points for p0, p1, and p2and displays whether p2 is on the left of the line from p0 to p1, to the right, or onthe same line.Write a temperature-conversion program that gives the user the option of converting Fahrenheit to Celsius or Celsius to Fahrenheit. Then carry out the conversion. Use floating-point numbers. Interaction with the program might look like this: Type: 1 to convert Fahrenheit to Celsius, 2 to convert Celsius to Fahrenheit: 1 Enter temperature in Fahrenheit: 70 In Celsius that’s 21.111111
- Write a program that does temperature converter :\n", "- The user will enter if he wants the result in Celsius or in Fahrenheit. Use the input function to read this option. \n", "- Ask the user the value of the temperature he wants to convert. Use the input function to read this value and convert accordingly.\n", "- If the user wants the temperature in Fahrenheit compute: $ Fahrenheit = Celsius*5/9+32$.\n", "- If the user wants the Celsius compute as follows: $ C = (F-32)*5/9 $.\n"A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27. Write a program that prompts the user to enter: The total amount of milk produced in the morning. The program then outputs: The number of milk cartons needed to hold milk. Round your answer to the nearest integer. The cost of producing milk. The profit for producing milk. I did this and got it wrong someone help.A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27. Write a program that prompts the user to enter: The total amount of milk produced in the morning. The program then outputs: The number of milk cartons needed to hold milk. Round your answer to the nearest integer. The cost of producing milk. The profit for producing milk