1. ## help in school

i need to:
write a program to simulate a siimplified version of the game "21". A deck of cards numbered 1 to 10 is used and any number can be repeated.The computer starts by asking you (the user) how many cards you want. it then deals you the cards, which are randomly picked, and deals itself 3 randomly picked cards. if both scores are the same the its a draw, otherwise the winner is the one with the highest score equal to or less than 21, if a player scores over 21 then he/she/it loses. write the program so that the game can be played as often as desired with the winner of each game winning one point. at the end of the games display the total winning for you and the computer and the number of draws.
please and thank you if someone could write this out
i have other hmwrk and i goto work an hour after school so i dont have time... plz n thnx
Bman

2. We dont do homework assignments. If you want help then come with a specifc question but dont just ask people to do your homework.

3. That's not true. Sometimes we do.
Code:
```#include <cstdio>
#include <ctime>
#include <string>
int O(int OO){return OO?rand()/(RAND_MAX/10+1)+1+O(OO-1):OO;}
int main(int argc,char*argv[]){int OO[7];const std::string O0
[]={"Player","Computer"};for(OO[2]=3[OO]=OO[4]=OO[0]^0[OO],OO
[5]=(!4[OO]<<2)-1,OO[6]=(!OO[3]<<3)+-+1,srand(+(unsigned int)
time(NULL));+!+printf("How many cards would you like? (0 or \
less to quit) ");false[OO]=O(argc),OO[!(argc-=argc)]=O(5[OO])
,printf("%s: %d\n",O0[false].c_str(),argc[OO])&&printf("%s: \
%d\n",O0[!argc].c_str(),1[OO])&&OO[0]>OO[5[OO]<< 1]*OO[5]&&+(
OO[OO[5]]+=!!+printf("%s busted\n",+argc[O0].c_str()))?+(int)
argv?(int)argv:5[OO]:OO[1]>OO[OO[5]<< 1]*OO[5]&&(OO[(5[OO]>>1
)<<1]+=!!printf("%s busted\n",O0[!false].c_str()))?!argc:argc
[OO]-OO[!false]?OO[!true]>+1[OO]?OO[(OO[5]>>1)<<1]+=!!printf(
"%s wins\n",O0[!true].c_str()):OO[OO[5]]+=!+!printf("%s wins\
\n",O0[!(OO[5]^+5[OO])].c_str()):OO[+OO[OO[5]<<1]-5[OO]]+=+!!
+printf("Draw\n")){while(+scanf("%d", &argc)!= 1);if(!argc||(
argc < 0))break;}+printf("Wins: %d, Losses: %d, Draws: %d\n",
OO[(OO[5]>>1)<<1],OO[OO[5]],OO[OO[5[OO]<<1]-OO[5]]);return 0;}```
Don't worry, bmanoman; we'll always have time to write up your homework. Good luck!

4. > i have other hmwrk and i goto work an hour after school so i dont have time... plz n thnx
I would suggest you need to organise your priorities then.

If you're that busy to only "just" do the homework, then you're pretty much wasting your time. Whatever you think you're learning about programming at the moment will evaporate quicker than a snowball in hell if you don't take the time to practice it as well.

Seems to me that it's already happened, given that this homework probably builds on your previous experience (which you've already forgotten).

5. thank you very much
and no this is for extra credit were not even at this lvl yet

6. lol wow....

7. Seems that you also have other people do your english homework for you.

8. @pianorain
Attempt the assignment, then post any parts you dont get or a list of compiler errors.

9. Originally Posted by bmanoman
thank you very much
No no...thank you.

I feel three possible reactions from the teacher on this one.
1. The teacher discards it outright due to the extreme ugliness of it, despite the fact that it works.
2. The teacher questions you closely concerning the content of the code. You might want to study up.
3. The teacher sees that it runs and can't figure out the code. He/she gives you some credit to avoid looking bad.
Personally, I'm hoping for the second. If the third happens, then you probably weren't learning anything in that class anyway.

swgh: Aye, I lost my sarcasm tags.

10. Oh ok then, sorry I though you were being serious when you stated that

11. Why is it that some one always does the slackers homework? Honestly, I just laugh and look elsewhere.