![]() |
| | #1 |
| Registered User Join Date: Nov 2007
Posts: 3
| write a program to play dice rolling game between two player --each player throws 3 dice in turns --the one with the higher total points of the dice will be the winner of each round and get one mark --the players can play as many rounds as they wish --the winner will be one with the highest marks after finishing all the rounds Thankyou for helping me~ |
| JC041214 is offline | |
| | #2 |
| Malum in se Join Date: Apr 2007
Posts: 3,188
| Try This - Code: #include <stdio.h>
int main(){
printf("DO YOUR OWN HOMEWORK!\n");
return 0;
}
__________________ Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off. |
| abachler is offline | |
| | #3 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,339
| What have you tried?
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is offline | |
| | #4 |
| Registered User Join Date: Nov 2007
Posts: 3
| I don't know how to write this, Could you give me some hinTS Thankyou~ |
| JC041214 is offline | |
| | #5 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,339
| Quote:
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is offline | |
| | #6 |
| Registered User Join Date: Nov 2007
Posts: 3
| #include<stdio.h> #include<stdilb.h> #include<time.h> main() { int x,y,z,sum1; strand(time(NULL)); X=RANDOM(6)+1 Y=RANDOM(6)+1 Z=RANDOM(6)+1 sum1=x+y+z Then I don't know how to complete~ |
| JC041214 is offline | |
| | #7 | |
| 3rd Week In C++ Join Date: Nov 2007
Posts: 22
| Please Quote:
2: No one will give you any help without an honest attempt at it first. 2a: Your code will not even compile and anyone who knows you can declare variables the way you did, knows that main has a keyword before it 2b: Anyone who knows to include 3 different things also knows to close every opening bracket with a closing bracket 2c: Your project requires input and output and you did not even make an attempt to prompt the user for anything or give any kind of feedback 2d: If this is the point which you are stuck, you did not mention compile error or attempt at it... 3: All of which leads me to believe you are just looking for someone to do your homework (which you might find, but i bet no one goes to work with you)
__________________ Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2 | |
| SRS is offline | |
| | #8 |
| Registered Abuser Join Date: Sep 2007 Location: USA/NJ/TRENTON
Posts: 127
| Code: #include<stdio.h> #include<stdilb.h> #include<time.h> also: Code: // we prefer: srand(time(0)); // to C-Style: srand(time(NULL)); // in c++ |
| sh3rpa is offline | |
| | #9 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,693
| > Then I don't know how to complete~ 1. what is RANDOM(), is that a function you've written based on rand() ? 2. You do the same thing again for player2, to calculate sum2, then compare both totals to see who won. |
| Salem is offline | |
| | #10 |
| Registered Abuser Join Date: Sep 2007 Location: USA/NJ/TRENTON
Posts: 127
| Listen to Salem, see what he's done for you? He's basically starting a process that you would benefit greatly from.... PSEUDO-CODE!!! (if you can't develop the pseudo-code for this simple a program, i think you need to seriously re-evaluate whether programming is for you or not). Since the lack of reply from the OP i'm guessing that he's gone else-where to find someone to complete his work for him. |
| sh3rpa is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Client-server system with input from separate program | robot-ic | Networking/Device Communication | 3 | 01-16-2009 03:30 PM |
| 2D RPG Online Game Project. 30% Complete. To be released and marketed. | drallstars | Projects and Job Recruitment | 2 | 10-28-2006 12:48 AM |
| Game Independent Anti-cheat Project Needs Programmers | GIA Project Lea | Projects and Job Recruitment | 3 | 09-15-2005 07:41 PM |
| Dice Rolling Program help | courtesan | C Programming | 3 | 08-17-2005 03:14 PM |
| How to write program for Serial and USB which connect to external hardware? | gogo | C Programming | 1 | 10-13-2004 12:15 PM |