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
July
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 31
Our Sponsors
Latest Postings
Comcast upgrades Upload Speed!
by Gizmo
Today at 04:00 PM
Robert Moore aka MooreR PC Magazine Subscription
by Gizmo
06/22/08 01:36 PM
How to write a GUI with C++ in windows?
by Murakami Kakason
06/18/08 06:21 AM
Podcasting, ideas and interests...
by ZER0_DECEPTION
06/16/08 07:43 AM
PHP -MVC(Model, View, Control) overview
by §intå×
06/09/08 05:07 AM
Vote for President
by ZER0_DECEPTION
06/06/08 07:46 AM
Notepad++ 4.9.2 - open source text editor
by Gizmo
06/06/08 01:42 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
6899 Members
45 Forums
10167 Topics
44858 Posts

Max Online: 677 @ 06/30/07 10:06 PM
Top Posters
Gizmo 6894
§intå× 3241
UGN Security 3113
IceMyst 1445
SilentRage 1273
Ice 1146
pergesu 1134
Infinite 1039
jonconley 954
Girlie 903
Newest Members
real-along, Murakami Kakason, die, ReduX, UknownWarrior
6898 Registered Users
Who's Online
0 Registered (), 9 Guests and 19 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
IRC Server Funding
by Gizmo
07/01/08 02:48 PM
Fixed: Front Page - News Display
by Gizmo
06/25/08 11:25 AM


Donate

Get the Google FireFox Toolbar
Get Firefox!
Get FireFox!