User Profile

Collapse

Profile Sidebar

Collapse
conman2495
conman2495
Last Activity: Oct 15 '14, 01:39 AM
Joined: Oct 7 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • conman2495
    started a topic Sum function of a for loop for a dice generator
    in C

    Sum function of a for loop for a dice generator

    I have written the code below that allows the user to input any sided dice and any number of rolls. The program will print out the output in sequence. I need to sum these outputs into one number, but I am having trouble writing a sum function for this. Any ideas?
    Code:
    //This Program Creates the Sum of a Number of Dice Rolls of the Same Size
    
    #include <stdio.h> 
    #include <math.h>
    #include <time.h>
    ...
    See more | Go to post

  • How can I fix this custom dice roll program to work correctly?

    I need to write a program that will prompt the user to input a number-sided dice and a number of rolls, and then it will output all of the rolls in a sequence. The program I have written will get the number of rolls correct, but something goes wrong with the number-sided dice. It will output numbers in the 100s for a 6-sided dice. Here's my code, does anyone know how to fix this? (My 'y' integer is the one for the number sided die).
    Code:
    
    
    ...
    See more | Go to post
No activity results to display
Show More
Working...