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, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
September
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Sponsored Links
Latest Postings
Doom 3
by Cyrez
09/11/14 08:58 PM
The History Thread...
by Cyrez
09/11/14 08:56 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666
08/22/14 09:21 AM
Latest Reviews
Topic Options
Rate This Topic
#45023 - 02/26/08 04: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
Sponsored Links
      
#45024 - 02/26/08 04: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 04: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 05: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

Featured Member
Registered: 08/22/14
Posts: 1
Forum Stats
2148 Members
46 Forums
34352 Topics
69521 Posts

Max Online: 1567 @ 04/25/10 02:20 AM
Top Posters
UGN Security 27514
Gremelin 7192
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Gecko666, defghi795767, Devo60, ali, lavos
2147 Registered Users
Who's Online
0 registered (), 306 Guests and 273 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!