Created
May 29, 2021 10:15
-
-
Save theorigin/46d560f3c4e8bb378cc2325134d21ce5 to your computer and use it in GitHub Desktop.
Roll the dice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var numberOfDice = 2; | |
var numberOfRolls = 2; | |
Console.WriteLine("Roll the Dice"); | |
Console.WriteLine("============="); | |
Console.WriteLine("How many dice do you want to roll?"); | |
Console.WriteLine("How many times do you want to roll?"); | |
for (int r = 1; r <= numberOfRolls; r++) | |
{ | |
Console.WriteLine($"Roll {r}"); | |
for (int d = 1; d <= numberOfDice; d++) | |
{ | |
Console.WriteLine($"Dice {d}"); | |
} | |
Console.WriteLine($"Total for roll {r} was "); | |
} | |
Console.WriteLine("Total for all rolls was "); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment