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 02:40
Respecting individual differencespre-test active2time remaining48: 47nina is exploring her gender identity and sexual orientationwhich best describes how the role of the media might influence nina during this time in her life? the media would her decide because television shows are always unbiased about gender issues and do notstereotypethe media could make things difficult for her because television sometimes portrays rigid ideas about gender roles.all forms of media will her decide because the media always portrays rigid ideas about gender roles.all forms of media will make things easy for her because the media always portrays open and fair ideas about gender roles.
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
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
Physics, 19.01.2020 10:31
question
History, 19.01.2020 10:31
question
Mathematics, 19.01.2020 10:31
question
Mathematics, 19.01.2020 10:31
Questions on the website: 13722362