subject

Suppose you can buy a chocolate bar from the vending machine for $1 each. inside every chocolate bar is a coupon. you can redeem seven coupons for one chocolate bar from the machine. you would like to know how many chocolate bars you can eat, including those redeemed via coupon, if you have n dollars. for example, if you have 20 dollars then you can initially buy 20 chocolate bars. this gives you 20 coupons. you can redeem 14 coupons for two additional chocolate bars. these two additional chocolate bars give you two more coupons, so you now have a total of eight coupons. this gives you enough to redeem for one final chocolate bar. as a result you now have 23 chocolate bars and two leftover coupons. write a program that inputs the number of dollars and outputs how many chocolate bars you can collect after spending all your money and redeeming as many coupons as possible. also output the number of leftover coupons. the easiest way to solve this problem is to use a loop.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a “fatal four” event?
Answers: 2
question
Computers and Technology, 24.06.2019 15:20
Local area networks use many of the same network technologies and the internet, only on a smaller scale. devices that access lans are equipped with a network interface that contains circuitry for wireless or wired connections. devices also have a physical address, in addition to the ip addresses acquired from a dhcp server. the most popular wired technology is . the most popular wireless technology is , which can be configured as a(n) or star topology. setting up a lan and configuring its router is fairly easy. the first step is to change the standard to one that is secure. next, create a(n) that uniquely identifies the network by name. it is also important to activate wireless to prevent wireless signals from being intercepted during transmission. a limited-access network can be created for visitors to use. by activating , the router will be able to assign ip addresses to each device that joins the network. to connect to a secure lan that is protected by encryption, an encryption , or password, is required. lans can be used to access data collected by iot devices and the networks that tie these devices together. technologies such as rfid, nfc, bluetooth smart, zigbee, and z-wave offer -power links, essential for battery-powered devices that can’t expend excess amounts of energy transmitting data.
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
You know the right answer?
Suppose you can buy a chocolate bar from the vending machine for $1 each. inside every chocolate bar...
Questions
question
Mathematics, 22.11.2019 20:31
question
Mathematics, 22.11.2019 20:31
question
Social Studies, 22.11.2019 20:31
question
Spanish, 22.11.2019 20:31
question
History, 22.11.2019 20:31
Questions on the website: 13722359