Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Choose your life
using System;
namespace choice
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter option 1.");
var option1 = Console.ReadLine();
Console.WriteLine("Enter option 2.");
var option2 = Console.ReadLine();
Console.WriteLine("Press any key!");
Console.ReadKey(true);
var random = new System.Random();
var result = random.Next(2);
if (result == 0)
{
Console.WriteLine($"{option1}!");
}
else
{
Console.WriteLine($"{option2}!");
}
Console.ReadKey(true);
}
}
}
@121jigowatts

This comment has been minimized.

Copy link
Owner Author

commented Mar 16, 2017

2択で迷ったときはプログラムで解決

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.