Advertisement
731MY

Untitled

Jun 13th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.58 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Random rand = new Random();
  13.  
  14.             string[] Male = new string[] { "JAMES", "JOHN", "ROBERT", "MICHAEL", "WILLIAM", "DAVID", "RICHARD", "CHARLES", "JOSEPH", "THOMAS", "CHRISTOPHER", "DANIEL", "PAUL", "MARK", "DONALD", "GEORGE", "KENNETH", "STEVEN", "EDWARD", "BRIAN", "RONALD", "ANTHONY", "KEVIN", "JASON" };
  15.             string[] Female = new string[] { "Sophia", "Isabella", "Emma", "Olivia", "Ava", "Emily", "Abigail", "Madison", "Mia", "Chloe", "Elizabeth", "Ella", "Addison", "Natalie", "Lily", "Grace", "Samantha", "Avery", "Sofia", "Aubrey", "Brooklyn", "Lillian", "Victoria", "Evelyn" };
  16.             string[] Last = new string[] { "SMITH", "JOHNSON", "WILLIAMS", "JONES", "BROWN", "DAVIS", "MILLER", "WILSON", "MOORE", "TAYLOR", "ANDERSON", "THOMAS", "JACKSON", "WHITE", "HARRIS", "MARTIN", "THOMPSON", "GARCIA", "MARTINEZ", "ROBINSON", "CLARK", "RODRIGUEZ", "LEWIS" };
  17.             string Input;
  18.             bool MaleName=false, FemaleName=false;
  19.             int i;
  20.  
  21.             Console.Write("Male Name ? (y/N):");
  22.             Input = Console.ReadLine().Trim().ToLower();
  23.             MaleName = (Input == "" || Input == "n") ? false : true;
  24.  
  25.             if (MaleName){
  26.                 for (i = 0; i <9;i++){
  27.                     Console.WriteLine("{0} {1} {2}", Male[rand.Next(0,9)], Male[rand.Next(0,9)], Last[rand.Next(0,9)]);
  28.                 }
  29.             }
  30.  
  31.             if (MaleName==false){
  32.                 Console.Write("Female Name ? (y/N):");
  33.                 Input = Console.ReadLine().Trim().ToLower();
  34.                 FemaleName = (Input == "" || Input == "n") ? false : true;
  35.                 if (FemaleName){
  36.                     for (i = 0; i <9; i++){
  37.                         Console.WriteLine("{0} {1} {2}", Female[rand.Next(0,9)], Female[rand.Next(0,9)], Last[rand.Next(0,9)]);
  38.                     }
  39.                 }
  40.             }
  41.  
  42.             if (MaleName == false && FemaleName == false){
  43.                 for (i = 0; i <9; i++){
  44.                     if(rand.Next(0,9) % 2 == 0){
  45.                         Console.WriteLine("{0} {1} {2}", Female[rand.Next(0, 9)], Male[rand.Next(0, 9)], Last[rand.Next(0, 9)]);
  46.                     }else{
  47.                         Console.WriteLine("{0} {1} {2}", Male[rand.Next(0,9)], Male[rand.Next(0,9)], Last[rand.Next(0,9)]);
  48.                     }
  49.                 }
  50.             }
  51.             Console.ReadKey();
  52.         }
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement