subject

// 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) {

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
You know the right answer?
// Assume hot dogs come in packages of 10, and hot dog buns come in packages of 8.

// Wr...
Questions
question
English, 14.04.2021 20:40
question
Mathematics, 14.04.2021 20:40
question
Mathematics, 14.04.2021 20:40
question
Mathematics, 14.04.2021 20:40
question
Mathematics, 14.04.2021 20:40
Questions on the website: 13722367