Advertisement
jyoung12387

Random Name Generator

Mar 16th, 2020
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text.RegularExpressions;
  4.  
  5. namespace testProgram
  6. {              
  7.     public class Program
  8.     {
  9.         public static void Main()
  10.         {
  11.             string[] firstNames = new string[] {"Jason", "Joe", "Martin", "Andy", "Brandon", "Carl", "Roger", "Keith", "Hector", "Victor", "Robert", "Reggie", "Jack", "Walter", "Monty", "Sean", "Steven", "Seth", "Roy", "Dennis", "Derick"};
  12.             string[] lastNames = new string[] {"Robertson", "Green", "Thompson", "Callaway", "Newton", "Jones", "Garret", "Alonzo", "Austin", "Love", "Miller", "Pluto", "Evans", "Brown", "Cooper", "Underwood", "Ortiz", "Anderson"};
  13.            
  14.             Random random = new Random();
  15.            
  16.             for(int i = 0; i < 15; i++)
  17.             {
  18.                 int f = random.Next(0,firstNames.Length);
  19.                 int l = random.Next(0,lastNames.Length);
  20.                
  21.                 Console.WriteLine("{0} {1}", firstNames[f], lastNames[l]);
  22.                
  23.             }
  24.            
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement