This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

SteamRandomGame

By: a guest on Dec 11th, 2013  |  syntax: C#  |  size: 1.04 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace SteamRandomGame
  7. {
  8.     class Program
  9.     {
  10.     static class RandomLetter
  11.     {
  12.         static Random _random = new Random();
  13.         public static char GetLetter()
  14.         {
  15.             int num = _random.Next(0,26);
  16.             char let = (char)('a' + num);
  17.             return let;
  18.         }
  19.     }
  20.  
  21.    
  22.         static void Main(string[] args)
  23.         {
  24.             Random _num = new Random();
  25.             int amnt = 0;
  26.  
  27.             Console.WriteLine("This is your Random Letter");
  28.             Console.WriteLine(RandomLetter.GetLetter());
  29.             Console.WriteLine();
  30.  
  31.             Console.WriteLine("Please enter the amount of games starting with that letter and press enter.");
  32.             amnt = Convert.ToInt16(Console.ReadLine());
  33.             Console.WriteLine();
  34.  
  35.             int n = _num.Next(1, amnt);
  36.             Console.WriteLine("Play the game that is number " + n);
  37.  
  38.             Console.ReadKey();
  39.  
  40.         }
  41.     }
  42. }
clone this paste RAW Paste Data