UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Our Sponsors

Latest Postings
Owning Servers
by ZER0_DECEPTION
Today at 02:45 AM
my old account still exists!
by Gizmo
08/19/08 02:27 PM
Burger King gone Wild!
by Gizmo
08/08/08 11:42 PM
PDX 2600
by rbcp
08/07/08 12:46 AM
The Pirate Bay- shut down?
by ZER0_DECEPTION
08/05/08 09:07 PM
Windows Events for Changing Access rights to a folder or a File
by Gizmo
08/05/08 12:32 PM
question about IE and CSS
by §intå×
08/04/08 08:51 PM
Server
by Gizmo
08/01/08 01:29 AM
Topic Options
#45023 - 02/26/08 07:15 AM Help in projects for C++
anubis Offline
UGN Newbie

Registered: 08/03/04
Posts: 15
Loc: 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."

Top
Our Sponsors
Sponsor Our Sponsors

Top  
#45024 - 02/26/08 07:24 AM Re: Help in projects for C++ [Re: anubis]
anubis Offline
UGN Newbie

Registered: 08/03/04
Posts: 15
Loc: 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."

Top
#45025 - 02/26/08 07:25 AM Re: Help in projects for C++ [Re: anubis]
anubis Offline
UGN Newbie

Registered: 08/03/04
Posts: 15
Loc: 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."

Top
#45026 - 02/26/08 08:03 AM Re: Help in projects for C++ [Re: anubis]
anubis Offline
UGN Newbie

Registered: 08/03/04
Posts: 15
Loc: 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."

Top



Forum Stats
6911 Members
44 Forums
10465 Topics
45204 Posts

Max Online: 677 @ 06/30/07 10:06 PM
Top Posters
Gizmo 6929
UGN Security 3441
§intå× 3250
IceMyst 1449
SilentRage 1273
Ice 1146
pergesu 1134
Infinite 1039
jonconley 954
Girlie 903
Newest Members
red queen, byopc, cybermox, NiPah, mcscrwdy25
6911 Registered Users
Who's Online
1 Registered (Gizmo), 8 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
Update Humpday - Aug 27, 2008
by Gizmo
08/28/08 12:58 AM
Update Humpday - Aug 20, 2008
by Gizmo
08/21/08 01:48 AM
Update Humpday - Aug 14, 2008
by Gizmo
08/14/08 08:33 AM
Update Humpday - Aug 06, 2008
by Gizmo
08/06/08 08:05 AM
Update Humpday - Jul 30th, 2008
by Gizmo
07/31/08 11:17 AM


Donate

Get the Google FireFox Toolbar
Get Firefox!
Get FireFox!