07:31C# rock-paper-scissors game 🗿
From the creator
C# rock paper scissors game project tutorial example explained #C# #game #tutorial using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { Random random = new Random(); bool playAgain = true; String player; String computer; String answer; while (playAgain) { player = ""; computer = ""; answer = ""; while (player != "ROCK" && player != "PAPER" && player != "SCISSORS") { Console.Write("Enter ROCK, PAPER, or SCISSORS: "); player = Console.ReadLine(); player = player.ToUpper(); } switch (random.Next(1, 4)) { case 1: computer = "ROCK"; break; case 2: computer = "PAPER"; break; case 3: computer = "SCISSORS"; break; } Console.WriteLine("Player: " + player); Console.WriteLine("Computer: " + computer); switch (player) { case "ROCK": if (computer == "ROCK") { Console.WriteLine("I
Published 2021-07-03 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





