Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApp8
  7. {
  8.    
  9.     class Program
  10.     {
  11.         static Random gen = new Random();
  12.         static string Generation(int N) {
  13.             string str = "";
  14.             for (int i = 0; i < N; i++) {
  15.                 str += (char)gen.Next('a', 'z' + 1);
  16.             }
  17.             return str;
  18.         }
  19.         static void Main(string[] args)
  20.         {
  21.             Console.WriteLine(Generation(10));
  22.             Console.ReadLine();
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement