subject

When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be in a box, so if you buy 13 donuts, you'll get 2 boxes with 12 in the first box and 1 in the second. If the integer variable numberOfDonuts contains the positive number of donuts purchased, which of the following will correctly give the number of boxes needed? a. int numberOfBoxes = 1 + numberOfDonuts / 12;
b. int numberOfBoxes = numberOfDonuts / 12 + numberOfDonuts % 12;
c. int numberOfBoxes = numberOfDonuts / 12;
d. int numberOfBoxes = (numberOfDonuts + 11) / 12;

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
You know the right answer?
When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be...
Questions
question
Mathematics, 30.07.2021 19:40
question
Mathematics, 30.07.2021 19:40
question
Physics, 30.07.2021 19:40
question
Mathematics, 30.07.2021 19:40
question
Mathematics, 30.07.2021 19:40
question
Mathematics, 30.07.2021 19:40
Questions on the website: 13722367