Quantcast

Maximum PC

It is currently Thu Sep 18, 2014 9:12 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help me debug this small program.
PostPosted: Wed Jul 15, 2009 10:28 am 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
Code:
Code Removed for personal reasons.



I've written the code and I got lost lol. Yes, I am writing this without Object etc.


Last edited by Dwood15 on Sat Jul 18, 2009 7:21 pm, edited 1 time in total.

Top
  Profile  
 
 Post subject:
PostPosted: Wed Jul 15, 2009 12:26 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
What does it do? What does it not do? What is it supposed to do?


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 16, 2009 9:25 am 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
CrashTECH wrote:
What does it do? What does it not do? What is it supposed to do?


Oh, yeah, sorry about that part.

It's simply a Random number generator based on dice with 11 sides.

It's supposed to display the probability of 2s, 3s, 4s, etc. based on X times the dice were rolled (I typically choose 100 rolls)

My problems are getting the probabilities to be displayed accurately.

Ex: of desired output:

2s: .222
3s: .1123
On down to 22.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 16, 2009 9:58 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
what out put do you get?


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 16, 2009 10:33 am 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
Sums Probabilities
0s 0.0
1s 0.0
2s 0.0
3s 0.01
4s 0.02
5s 0.05
6s 0.09
7s 0.04
8s 0.02

On and on and on.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group