Computers and Technology

// Assume hot dogs come in packages of 10, and hot dog buns come in packages of 8.

// Write a program that calculates the number of packages of hot dogs and the

// number of packages of hot dog buns needed for a cookout, with the minimum amount

// of leftovers. The program should ask the user for the number of people attending

// the cookout. Assume each person will eat 1 hotdog.

//

// The program should display the following details:

//

// The minimum number of packages of hot dogs required

// The minimum number of packages of hot dog buns required

// The number of hot dogs that will be left over

// The number of hot dog buns that will be left over

//

// Hint: You might want to use the % operator in one of your calculation

//

function packagesNeeded(numberOfPeople, itemsPerPack) {

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:10, kellysimkin6196
Read the code below. what will the computer print if the input for year_variable is 1700? if year_variable == 1776: print("your answer is correct. the declaration of independence was signed in “year_variable”.") elif year_variable < 1776: compute_variable = 1776 - year_variable. print("add “compute_variable“ years to your answer for the correct answer.") elif year_variable > 1776: compute_variable = year_variable - 1776 print("subtract “compute_variable” years from your answer for the correct answer.")
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, kierafisher05
What is the most popular genre of video games?
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, mads000
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, DSUDLER5555
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
Do you know the correct answer?
// Assume hot dogs come in packages of 10, and hot dog buns come in packages of 8.

// Wr...

Questions in other subjects:

Konu
History, 31.08.2019 09:30