Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A2Z Dice Roll
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Random dice = new Random(); int roll1 = dice.Next(1, 7); int roll2 = dice.Next(1, 7); int roll3 = dice.Next(1, 7); int total = roll1 + roll2 + roll3; Console.WriteLine($"Dice Roll: {roll1} + {roll2} + {roll3} = {total}"); if ((roll1 == roll2) || (roll2 == roll3) || (roll1 == roll3)) { if ((roll1 ==roll2) && (roll2 ==roll3)) { Console.WriteLine($"You Rolled triples! +6 bonus to total!\nToatal = " + (total + 6)); total += 6; } else { Console.WriteLine($"You rolled doubles! +2 bonus to total!\nToatal = " + (total + 2)); total += 2; } } if (total >= 15) { Console.WriteLine("You Win a payrise from Az!"); } else if (total >= 13) { Console.WriteLine("You Win a laptop from Az"); } else if (total >= 11) { Console.WriteLine("You Win a trip for two but you must take Az"); } else if (total >= 9) { Console.WriteLine("You Win a meal but you only get what Az doesnt eat!"); } else if (total >=7) { Console.WriteLine("You Win nothing and Az is laughing"); } } } }
run
|
edit
|
history
|
help
0
example
asxasdxsd
Gamez
olution to problem #2 from projecteuler.net
p link gener tor
C# queue
Programmes
Random number guessing game v1
Task List
Rand things kurs 8 network