Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#45023 - 02/26/08 12:15 PM Help in projects for C++  
Joined: Aug 2004
Posts: 15
anubis Offline
UGN Newbie
anubis  Offline
UGN Newbie

Joined: Aug 2004
Posts: 15
houston
Hello, ok well I´m working on two projects for C++ and I was wondering who can help me out finish my project...It would be awesome I just need ideas, because I got stuck...thanks in advance...ok here they are:

I got stuck somewhere, but would like to know how would you write it..(i know I´m still learning \:\) )hehe..


1) During the summer your 6 year old sister asks you to help automate her lemonade stand. She wants to use the family PC to compute and print the bill. She sells a cup of ice for $0.25, a small glass of lemonade for $0.60, a large glass of lemonade for $1.00 and a cookie for $0.45. The interactive input/output should look exactly as shown below. Everything shown is output produced by the program except for the numbers (1, 1, 2, 4, 10.00) typed by the user in response to the prompts.




INPUT/OUTPUT
Enter number of cups of ice: 1
Enter number of small glasses of lemonade: 1
Enter number of large glasses of lemonade: 2
Enter number of cookies: 4

Total Amount Due = $4.65
Enter money paid: 10.00

=======================================
Lucky Lucy’s Lemonade Stand Bill

Cups of Ice
Quantity=1 Cost=$ 0.25
Small Glasses of Lemonade
Quantity=1 Cost=$ 0.60
Large Glasses of Lemonade
Quantity=2 Cost=$ 2.00
Cookies
Quantity=4 Cost=$ 1.80

Total Amount Due =$ 4.65
Money Paid =$10.00
Change Due =$ 5.35
=======================================


-h4c6-" ...it is in the nature of the hacker to differ from others, to differ even from oneself, over time. To hack is to differ...to learn is not a crime."
Sponsored Links
#45024 - 02/26/08 12:24 PM Re: Help in projects for C++ [Re: anubis]  
Joined: Aug 2004
Posts: 15
anubis Offline
UGN Newbie
anubis  Offline
UGN Newbie

Joined: Aug 2004
Posts: 15
houston
oh and the other I´m working on is about a game show, which I think its the one that is giving me problems.. :P

--Game Show

You are a contestant on a game show and have won a shot at the grand prize. Before you are three doors. $1,000,000 in cash has randomly been placed behind one door. Behind the other two doors are the consolation prizes of dishwasher detergent. The game show host asks you to select a door, and you randomly pick one. However, before revealing the prize behind your door, the game show host reveals one of the other doors that contain a consolation prize. At this point, the game show host asks if you would like to stick with your original choice or to switch to the remaining door.

Write a function to simulate the game show problem. Your function should randomly select locations for the prizes, select a door at random chosen by the contestant, and then determine if the contestant would win or lose if sticking with the original choice or switching to the remaining door. You may wish to create additional functions invoked by this function.
Next, modify your program so that it simulates playing 10,000 games. Count the number of times the contestant wins when switching vs. staying. If you are the contestant, what choice should you make to optimize your chances of winning the cash, or does it matter?

Hint 1: The probability is not always 50% or 33%.
Hint 2: Use the integers 0, 1, or 2 to represent the doors, and a variable to store which door is selected or contains a prize.
---

any help would be awesome (on codes)..


-h4c6-" ...it is in the nature of the hacker to differ from others, to differ even from oneself, over time. To hack is to differ...to learn is not a crime."
#45025 - 02/26/08 12:25 PM Re: Help in projects for C++ [Re: anubis]  
Joined: Aug 2004
Posts: 15
anubis Offline
UGN Newbie
anubis  Offline
UGN Newbie

Joined: Aug 2004
Posts: 15
houston
Actually on the first post I´m kind of ok,...I think it would be the second where I need ideas ... :o)


-h4c6-" ...it is in the nature of the hacker to differ from others, to differ even from oneself, over time. To hack is to differ...to learn is not a crime."
#45026 - 02/26/08 01:03 PM Re: Help in projects for C++ [Re: anubis]  
Joined: Aug 2004
Posts: 15
anubis Offline
UGN Newbie
anubis  Offline
UGN Newbie

Joined: Aug 2004
Posts: 15
houston
BTW I am working on it, I just need ideas, don´t think that I need the whole project done ...lol..


-h4c6-" ...it is in the nature of the hacker to differ from others, to differ even from oneself, over time. To hack is to differ...to learn is not a crime."

Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics47,470
Posts82,640
Average Daily Posts8
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 40,634
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)