Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
!!!! Help !!!!
Old
Terroja Kincaid
Guest
 
Status:
Posts: n/a
Default !!!! Help !!!! - 05-26-2008, 08:18 PM

Write a program that asks the user how many cigarettes they smoke in a day. The program shall then calculate how many packs of cigarettes are bought in one year. Keep in mind that a pack of cigarettes contains 25 cigarettes.

Modify the program to calculate how many packs of cigarettes the user will buy from now until X number of years in the future (the user shall be able to enter the value of X). The program should output the number of packs and grand total for every year.

Smoking is addictive and smokers tend to smoke more each year. Assuming the average smoker smokes 2% more each year of their life, modify the program to calculate how many packs the person will have consumed X years in the future.

Modify the program to calculate how much money the user spends a year and in their life time on cigarettes. The program should output the cost per year and total cost. Keep in mind that the pack of cigarettes costs $9.50 each.

Remember that the cost for a pack of cigarettes goes up about 3% a year. Modify the program to calculate the amount of money spent a year and in their life time taking into account the price goes up each year by 3%.

Modify the program to calculate how much money you would have if each year you put that money into a GIC paying 2.5% a year.









***I need help creating this program; especially with the last part involving the GIC.***
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 05-27-2008, 04:25 AM

There is no need to post your question to multiple subforums. It is a lot easier to refer back to your thread when there is only one. I have removed the duplicates.

Also, in reference to your assignment, rather than just posting the entire assignment, people would be more apt to help you if you showed some progress or some attempt at the problem.

What I don't understand is why this program is being written in Alice. It is not particularly visual nor takes advantage of Alice's benefits. It would be a whole lot easier to write said program in a non drag-and-drop programming environment.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.