Ask Experts Questions for FREE Help !
Ask
    Zenboraku's Avatar
    Zenboraku Posts: 1, Reputation: 1
    New Member
     
    #1

    Sep 19, 2013, 08:57 AM
    Average returned as 0.0?
    Hi, I'm currently trying to make a program that throws a dice 30 times and then returns the average throw.

    It looks like this; Image #238502 - CtrlV.in Image Hosting
    I don't know why my average is returned as 0.0.
    Anyone know why?
    Thank you for your time.
    Pelusawoman's Avatar
    Pelusawoman Posts: 23, Reputation: 2
    New Member
     
    #2

    Sep 20, 2013, 01:37 PM
    What are you doing with total?

    double average;
    double total; (What is the value? Zero?)
    ...
    average = total/30;

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Average Collection and Payment Period and Average Days of Sales [ 0 Answers ]

I have to calculate the following ratios: 1.Average Collection Period 2.Average Payment Period and 3. Average Days of Sales available in inventory Of a health company which receives most of its revenue in prepaid advance and it does not have inventory as does the trading firm. Can some...

Average speed and average velocity [ 1 Answers ]

Q: Average speed and average velocity Every morning you jog around 250 meter track four times in 30 minutes. What is your average speed and average velocity?

Average speed and average velocity [ 2 Answers ]

Every morning you jog around 250 meter track four times in 30 minutes. What is your average speed and average velocity?

Average income of an average auto salesman [ 1 Answers ]

What is the average income of an average auto salesman?

Average speed/average velocity [ 1 Answers ]

A horse canters away from its trainer in a straight line, moving 150 m away in 19.0 s. It then turns abruptly and gallops halfway back in 4.6 s. (a) Calculate its average speed. m/s (b) Calculate its average velocity for the entire trip, using "away from the trainer" as the positive...


View more questions Search