Source code - slot.cpp

Find C and C++ source code to help you learn to program. You can submit your own code, or you can simply browse and download the code of others.

Index :: Games / slot.cpp
resource information
Title slot.cpp
Category 2
Description A slot machine game.
Contact Joe Tchamitchian
Added 08-10-2002 at 01:55 p.m.
Last Updated 08-10-2002 at 01:55 p.m.
Current Rating 3.2972972972973
Rate Resource
Number of Reviews 37
Review this Resource
  • online cash advance <a href="">loan application online</a> online cash advance <a href=>online loan application</a>
    posted at 07:06 p.m. on 01-22-2018
  • do my research paper <a href="">research paper</a> paper writing <a href=>research essay</a>
    posted at 05:42 p.m. on 01-14-2018
  • loans online no credit check <a href="">payday installment</a> quick loans no credit check <a href=>quick loans no credit check</a>
    posted at 04:14 a.m. on 01-14-2018
  • free porn web cam <a href="">virtual sex</a> free webcam porn <a href=>free web cam sex</a> buy dissertation <a href="">research essay</a> school papers <a href=>help me with math homework</a> online payday loan application <a href="">online loans direct lenders</a> online payday loan application <a href=>online loans</a> best payday loan <a href="">easy online payday loans</a> easy online payday loans <a href=>payday loan near me</a> payday <a href="">best payday loan online</a> best payday loan <a href=>best payday loan online</a> instant online loans <a href="">instant payday loans</a> direct payday loans <a href=>no credit check emergency loans</a> dissertation writing <a href="">writing a paper</a> essay writing <a href=>essay writing</a>
    posted at 08:08 p.m. on 01-11-2018
  • loan <a href="">loan</a> cash loans <a href=>no credit check loan</a>
    posted at 11:39 a.m. on 01-11-2018
  • cash advance <a href="">cash advance</a> payday loans online no credit check <a href=>online payday advance</a>
    posted at 11:01 a.m. on 01-11-2018
  • safe auto insurance company <a href="">cheap liability insurance in texas</a> compare auto insurance rates <a href=>car insurance</a>
    posted at 08:27 a.m. on 12-24-2017
  • online payday loans no credit check <a href=>payday loans online</a> online payday loans <a href=>payday loans online colorado</a>
    posted at 04:14 p.m. on 11-03-2017
  • <a href=>essay writing service</a>
    posted at 06:04 p.m. on 09-03-2017
  • <a href=>cialis online</a>
    posted at 02:45 p.m. on 08-31-2017
  • <a href=>buy cialis online</a>
    posted at 02:13 p.m. on 08-31-2017
  • wh0cd97695 <a href=>lamisil</a> <a href=>benadryl-d</a> <a href=>generic lopid</a> <a href=>benzac online</a> <a href=>clozaril</a> <a href=>karela</a> <a href=>drug keppra</a>
    posted at 08:13 a.m. on 07-22-2017
  • wh0cd24220 <a href=>tricor</a> <a href=>diflucan</a> <a href=>furosemide 40 mg without prescription</a> <a href=>vermox</a> <a href=>neurontin</a> <a href=>prednisone</a> <a href=>celexa</a> <a href=>malegra dxt</a>
    posted at 04:29 p.m. on 07-09-2017
  • wh0cd24220 <a href=>elocon</a> <a href=>tetracycline</a> <a href=>generic crestor</a> <a href=>Amoxicillin</a> <a href=>toradol generic</a>
    posted at 03:43 p.m. on 07-09-2017
  • wh0cd97421 <a href=>methotrexate</a> <a href=>Propranolol</a> <a href=>BUY TENORMIN</a>
    posted at 06:51 p.m. on 06-14-2017
  • uBugAA <a href="">swdtsuhpsqvi</a>, [url=]eklzmdgjrdjr[/url], [link=]lpugrdxlkdnq[/link],
    posted at 02:08 a.m. on 11-30-2016
  • 1
    posted at 07:55 p.m. on 11-24-2016
  • 1
    posted at 09:41 p.m. on 11-23-2016
  • 1
    posted at 06:53 p.m. on 11-23-2016
  • 1
    posted at 02:23 p.m. on 11-05-2016
  • 1
    posted at 02:24 a.m. on 10-10-2016
  • 1
    posted at 06:57 p.m. on 09-13-2016
  • KwOxhB <a href="">tbaklklugzao</a>, [url=]zrqfvsfqbeig[/url], [link=]pftsjakxgvtl[/link],
    posted at 10:01 p.m. on 07-02-2016
  • 5Kg4qm <a href="">bechhbzusodc</a>, [url=]qajpgucpacjh[/url], [link=]jeaxoixpftcs[/link],
    posted at 06:44 a.m. on 06-19-2016
  • Thanks for the reply Bob!Opps sorry, I ment keep each character on there own cuotsm sprite sheet (as in .h and dot m file) sorry sometimes these things are easier to communicate with the actual project! (im a terrible typer!)I have heard of people referring to keeping all the characters on an array and using getChild method (but if using separate cuotsm files works just as well, I'll keep with that until i get a bit better at coding to understand how to achieve this.)Your neat macro trick to control z depth and playback speed and a myriad of other options, will probably ease the manageability side of keeping my cuotsm sprites separate in any case I Couldn't recommend the Galaxy fighter course enough alone for these little tricks and tips, which certainly make life a lot lot easier! P.s Thanks! (its my first try at making animation, although I worked in an animation studio I was more of a 3d texture artist and illustrator/digi artist, so its nice to be able to try something new)now i just have to keep working on learning to code then ill be able to combine all things i like into one project!anyway thanks again!Kind regardsNatalie
    posted at 06:58 a.m. on 12-04-2015
  • I modified the source code and instead of 4 tokens I edited it to 400. I was playing for some time and finally i got three same numbers (9 9 9) and it doesn't show that I win.
    posted at 04:58 a.m. on 09-03-2015
  • /* Slot Machine Program by Joe Tchamitchian*/ #include <iostream.h> #include <stdlib.h> #include <time.h> int main() { int x,a, b, c, token=4; srand(time(0)); cout<<"\t********************************************************\n" <<"\t* Welcome to slot machine. *\n" <<"\t* Would you like to play? (1 to play, 2 not to play) *\n" <<"\t********************************************************\n\n"; cin>>x; while(token!=0) {cout<<"You have "<<token<< " tokens\n\n" <<"Pull? (1 to pull, 2 not to pull)\n\n"; cin>>x; if(x==1) { a = 1+rand() %10; b = 1+rand() %10; c = 1+rand() %10; cout<<"\t\t"<<a<<" "<<b<<" "<<c<<"\n\n"; } else cout<<"OK\n"; { if(a==b==c) { token+=4; cout<<"You win\n\n"; } if(a==b || b==c || a==c) { token+=1; cout<<"You got two out of three\n\n"; } else { token-=1; cout<<"You loose\n\n"; } } } return 0; }
    posted at 06:48 a.m. on 01-07-2015
  • makes for a smooth ride and pulls well. Reviewers are of the opinion that the Beetle is built for cruising and being noticed in but this version has more to offer.The Beetle has a reputation for its distinct appearance. You can further enhance the looks of your car by using Beetle body kits. A body kit is a collection of exterior modifications to the car. By this you can make changes such as add bumpers Nike Air Foamposite One
    posted at 09:34 p.m. on 10-13-2014
  • vXc9Eo <a href="">cprewkwhjhhr</a>, [url=]oermzljwsvmy[/url], [link=]allzelovqtpz[/link],
    posted at 06:05 a.m. on 05-26-2013
  • vqH7od , [url=]ercrvixtgmca[/url], [link=]jwvdpvkqfzif[/link],
    posted at 12:28 p.m. on 01-06-2012
  • oboqI6 <a href="">azvnwuvtztia</a>
    posted at 07:24 a.m. on 01-06-2012
  • 1WDftU , [url=]cbzsredmaxcu[/url], [link=]mraiqnosummf[/link],
    posted at 08:21 a.m. on 01-04-2012
  • cQInUQ <a href="">yoqchtflwxrb</a>
    posted at 04:03 a.m. on 01-04-2012
  • You've got to be kidding me-it's so tnrasparently clear now!
    posted at 08:36 a.m. on 01-03-2012
  • Yea i also found another problem. at the beginning where it asked to push 1 to play or 2 not to play.. if you pushed any other number.. it would give you a you could just keep pushing a diff number then enter and gain tokens
    posted at 05:13 p.m. on 04-24-2009
  • Program has major error in it. It never lets you win a Jackpot LOL. It was not tested properly
    posted at 05:37 p.m. on 07-03-2004
  • um...a decent begining needs a bit of work though the way the choices are used is very awkward no to mention there seems to be a logic error enter 1 a couple of times then enter 2, to see what I mean
    posted at 07:22 a.m. on 07-02-2003