When you make taffy (a pliable candy), you must heat the candy mixture to 270 degrees Fahrenheit. Write a program that will help a cook make taffy. The cook should be able to enter the temperature reading from his/her thermometer into the program. The program should continue to let the cook enter temperatures until the temperature is at least 270 degrees. When the mixture reaches or exceeds 270 degrees, the program should stop asking for the temperature and print
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: "Since you have not mention any programming language, so we will write this program in C++…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: In the game of BizzBuzz, players generally sit in a circle. The player designated to go first says…
A:
Q: You have been asked to write a program to play rock-paper-scissors. Your program will ask the user…
A: PROGRAM CODE: import java.io.*;import java.util.*; class Main { public static String…
Q: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The…
A: Answer : #include<iostream>#include<ctime>#include<cstdlib>using namespace std;int…
Q: Write a program that calculates and prints the amount of wages due to an employee for a week's work.…
A: C++ program to calculate the amount of wages due to an employee for a week’s work. Prompt the user…
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a value…
A: PROGRAMimport java.util.Scanner;public class Shubham { public static Void main(string[] args) {…
Q: The power of the microwave can be calculated as follows: Power=Work/Time Work is measured in joules…
A: code: #include<iostream> using namespace std; //main method int main() { //variable…
Q: A large book box holds 80 lbs, a medium box hold 50 lbs. and a small holds 30 lbs. The average book…
A: A pseudo-code is an informal description of the algorithm, usually in English language. An algorithm…
Q: Write a program that plays the popular scissor-rock- paper game. (A scissor can cut a paper, a rock…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION Define…
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: Step 1: Prompt and accept property value from the user. Step 2: Prompt and accept tax rate per $100…
Q: Write a program that calculates the estimated hours and minutes for a trip given the number of miles…
A: Given: Write a program that calculates the estimated hours and minutes for a trip given the number…
Q: A quadratic equation is an equation of the form ?? 2 + ?? + ? = 0 where ?, ?, and ? are the…
A: Step 1:- Note:-There is no output format is given therefor I solve the quadratic equation and find…
Q: An internet service provider has three different subscription packages for its customers:…
A: In this JAVA program, We have to calculate the total bill for number of hour watched and package…
Q: Write a program that will display "IT'S COLD!" if the temperature is less than 20, "IT'S HOI" if the…
A: #include <iostream> using namespace std; int main(){ float t; cout<<"Computing the…
Q: Write a program that reads in an investment amount, the annual interest rate, and the number of…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: remember, some companies use letters to show their telephone number. For example, the telephine…
A: //Use "stdafx.h" only, if using visual studio. #include "stdafx.h" // Declare necessary header…
Q: Write a program that determines a student's grade. The program will read three types of scores…
A: The program is written in C++ Language. Check the program screenshot for the correct indentation.…
Q: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a…
A: code: //Room rent #include<iostream> using namespace std; int main() { double cost, tax_amt,…
Q: How do I solve this 3 step problem dealing with fitness and calorie tracking in java? thnks and…
A: Hello. Since you have posted multiple questions and not specified which question needs to be solved,…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: In this exercise you will create a program that reads a letter of the alphabet from the user. If the…
A: In this program Get the input alphabetical letter from the user Using if statement check the entered…
Q: Write a program that prompts the user to enter an integer between1 and 12 and then displays the name…
A: Program approach: Input an integer between 1 and 12. Displays the name of the month that…
Q: 2. Write a program that will read a number and will display the factors of the number. Factors are…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: A weapon shop sells arrow for $3 each. Currently, there is an ongoing buy 7 free 1" promotion, where…
A: #include <iostream>using namespace std; int main(){ int price = 3; int num;…
Q: You'll write a poem in this program. However, there are two types of poems you'll have to print out:…
A: Actually, Java is a programming language originally developed by James Gosling at Sun Microsystems…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Since programming language is not mentioned in the question, we will answer this question in the C++…
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: Mad Libs is a game where the player selects words based on part of speech that are then used to fill…
A: In the given code below Declare the variable holder as a string. Declare the List name input of the…
Q: Write a program that plays the popular scissor–rock–paper game. (A scissor can cut a paper, a rock…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args)…
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Answer the above question are as follows:
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: ********************************************* // iostream in C++ is the standard library which…
Q: Lab Work 2 In this lab work, you will implement a coffee shop example. In this coffee shop,…
A: To create: To write a menu-driven C program for a coffee shop that asks the user the number of…
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Since no programming language was mentioned in the question, I have used C language to solve.
Q: Write a program that finds the negative integer solutions of the following equation ax³ + bx² + cx'…
A: The objective of the given problem is to find the negative integer solution in the range of -200 to…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Purpose of the program: This program computes the total cost of different types of lumber for an…
Q: For this program you need to use Eclipse. Carefully read the instructions and write a program that…
A: The program has the following algorithm: Step 1: Create object for “Scanner” class to read the user…
Q: How do i solve this problem in python? ( has 3 steps)
A: NOTE:The given information is incomplete (Formula to calculate the minutes to walk or run for a…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: Hello student Here is your answer
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a value…
A: Lets see the solution.
Q: (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or…
A: Algorithm for the code: Step 1: Declare three sides of the triangle. Step 2: Enter three sides at…
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION. Define…
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Program in java for calculation of monthly and total payments for each interest rate. import…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Program Approach: Declare necessary variables in main function. Define float bf method which…
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: • Write an application that inputs one number consisting of 3 digits [for example 125] from the…
A: using System; public class RecExcerise4 static void main() { console.write("\n\n recursion:…
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: In this exercise, we will either have a circle inside a polygon for which we will calculate the…
A: Your C++ program is given below as you required with an output.
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
use jave and while loops
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program to help Buddy (the sheepdog) calculate the average age of all his sheep. Theprogram will accept as many ages as Buddy needs to input. The program should help Buddyminimize input errors by error-checking the age for him (everybody knows the maximum age forcartoon sheep is 9 years old). When Buddy’s sheep start to get old, he needs to breed moresheep. So, the code should also let Buddy know if the average age indicates if his sheep are aging,young, or middle-aged based on the chart below: Average Sheep Age Population is… <= 3 Young 4 - 6 Middle-aged > 6 AgingUsing the appropriate loop, the code should execute 3 test runs (see output for specifics).Additional Requirements:• For this lab use strncpy to store the output for the maturity of the sheep.• Properly document your code and use appropriate structure & style throughout.1 - Complete the…Write a program to help Buddy (the sheepdog) calculate the average age of all his sheep. Theprogram will accept as many ages as Buddy needs to input. The program should help Buddyminimize input errors by error-checking the age for him (everybody knows the maximum age forcartoon sheep is 9 years old). When Buddy’s sheep start to get old, he needs to breed moresheep. So, the code should also let Buddy know if the average age indicates if his sheep are aging,young, or middle-aged based on the chart below: Average Sheep Age Population is… <= 3 Young 4 - 6 Middle-aged > 6 AgingUsing the appropriate loop, the code should execute 3 test runs (see output for specifics).• use strncpy to store the output for the maturity of the sheep. Think about which loop to run for one Test Run (i.e. the primary loop)2 - Think of which loop to run so it executes 3 test runs (auxiliary…Write a program that simulates the proverbial game of Russian Roulette. Theprogram will prompt the user with how many players will be in the game where amaximum of 50 players can play. The program will next prompt the user to enter a “badnumber” between 1 and 6. Once entered, the program will go in turn to each player thatis in the game and assign a random number between 1 and 6 and compare it to the “badnumber”. If there is a match, then that player is out of the game. If there is no match,then that player remains in the game. Once all the players go this process, the processrepeats again in the next round for the remaining players starting again with the firstplayer that is still in the game. Only players that are still in the game will receive arandom number and have it compared to the “bad number”. If a player is out of thegame, then the player is ignored and does not receive a random number. This processcontinues to repeat this way round by round until only one player remains who…
- Question: Find the even multiples of any number chosen by the user in a given range – the usershould specify the multiples of which number they want to print and a minimum and maximumvalue. The multiples printed should be within the [minimum, maximum] range. For example, ifthe user chooses the number 7 and would like to print all even multiples in the [15, 60] range, theprogram should print all the even multiples that are bigger than or equal to 15 (minimum), butsmaller than or equal to 60 (maximum). The program should keep a count of how many numberswere printed and should output that count, as well as the numbers. The output then, for theexample given, should be 28, 42, 56, and the count should be 3. Create a flowchart and shell script.can you make it that it asks if the player wants to make the first selection or if they want to go second after theprogram moves.also once the game is over, the program should ask the user if they want to playagain. If so, clear the board and start the game. Otherwise, the programs exits.Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice costs $2.5, but the price varies with the amount that he purchases. The following table shows the discount that Jacob receives. Order Volume Discount Rate >= 200 bags 25% off 120 - 199 bags 20% off 60 - 119 bags 15% off 40 -59 bags 10% off 20 – 39 bags 5.5% off 0-19 bags No discount (1) Inyourprogram,definevariableswithmeaningfulnamestoacceptuserinputonordervolume, and calculate total ordering cost based on the order volume inputted. Use if-else statements to handle the calculations for different order volumes as shown in the above table. (2) Yourprogramshouldprintoutuserordervolume,discountrate,andtotalorderingcostinconsole (similar to the following sample outputs)
- Python programming In a department store sale, customers who purchase over 2000 are given 10% discount. Write a program that will accept for the purchase amount of a customer, solve for his/her discount if there’s any, ask for the money he/she is going to pay, then output the discounted price and the change of the customer.”For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.Write a program that prompts the user to input five decimal numbers. The program should then add thefive decimal numbers, convert the sum to the nearest integer, and print the result. Use the static_caststatement with an appropriate equation to convert the sum to an integer. Compile and run yourprogram with the following test data:Case 1: Input: 5.1, 5.1, 5.1, 5.1, 5.1. Expected Output: 26.Case 2: Input: 5.0, 5.0, 5.0, 5.0, 5.0. Expected Output: 25. The language is C++
- Write a program that verifies the delimiters in a line of text or expression typed by theuser. In this case, we will take an arithmetic expression like a*(b+c)+[c/(a-b)]. Yourprogram needs to validate the expression such that opening and closing brackets areproper or not which means the brackets are balanced or not.Write a simple payroll program that will display employee’s information. Refer to the UMLClass Diagram for the names of the variable and method. This should be the sequence of theprogram upon execution:a. Prompt the user to input the name of the employee.b. Prompt the user to select between full time and part time by pressing either F (fulltime) or P (part time).c. If F is pressed, ask the user to type his monthly salary. Then, display his name andmonthly salaray.d. If P is pressed, ask the user to type his hourly rate and hours worked separated by aspace. Then display his name and wage.This is basically something that has a certain number of states (sort of like how a traffic light can be Red, Yellow, Green) and changes from one state to another.This program will have 4 states: HAPPY, HUNGRY, BORED, SAD. Here are the rules. Our animal starts in a state of Happy, with the values for hungry = 0 and bored = 0. Each round the player can "feed", "play" or "ignore" their animal. If they feed their animal, then the hungry meter goes down and bored meter goes up. If they play with their animal, then the bored meter goes down and the hungry meter goes up. If they ignore their animal, then both hungry and bored go up. Don't go below 0 Here are the state changes. Each one of these is a "case" in a switch (from current state -> new State):HAPPY If hungry >= 2 transition to HUNGRY If bored >= 2 transition to BORED HUNGRY if hungry >= 4 transition to SAD if bored > hungry transition to BORED if hungry < 2 transition to HAPPY BORED If bored >= 4…