Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RandomStringGenerator
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Random
- //strings between a-z A-Z 0-9
- //no input only output
- // 10 symbols length
- Random rand = new Random();
- for (int i = 0; i < 10; i++)
- {
- int n = rand.Next(48, 122);
- if ((n>= 58 && n <= 64) || (n >= 91 && n <= 96))
- {
- if (i != 0)
- {
- i -= 1;
- continue;
- }
- else
- {
- i = 0;
- continue;
- }
- }
- Console.Write((char)n);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement