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>
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).