subject

Here is this story behind the code: you must find out from the user how many of their friends are coming over (must include yourself), how many cans they want to drink of beer, and how many packs are needed. I need help with the calculation as I am a bit off.
Example:
Friends = 10 (including self)
Beer Cans needs = 14

With this being said, the beer only comes in 6-packs. So here is what I have so far:
10 people * 14 cans = 140 cans

140 cans / 6 packs = 23.333 packs (BUT this is suppose to be 24 packs from what the instructor has included in the example because you can't obviously just buy 23.3 packs, so what is this equation supposed to be in order to get 24 and not 23 as an int, NOT a double)

Overall, I don't really need any coding answers, but mostly calculations for finding the packs needed. What can I put in my code to make it round to 24 appropriately?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
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
You know the right answer?
Here is this story behind the code: you must find out from the user how many of their friends are co...
Questions
question
Spanish, 12.11.2019 20:31
Questions on the website: 13722363