everestsh
everestsh
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
/home/runner/ImgurGEN/main.cs(28,2): error CS1513: } expected [/home/runner/ImgurGEN/main.csproj] The build failed. Fix the build errors and run again.
12 replies
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
@ZuggerFish
12 replies
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
but that would result in 3 for loops which is bad
12 replies
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
codes are inside it
12 replies
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
but I want it to clear it after the 1000
12 replies
CC#
Created by everestsh on 1/17/2023 in #help
❔ Random Letter
using System;
using System.IO;

class GFG{

public static void Main(string[] args)
{
Random res = new Random();

String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

String randomstring = "";
for (int i = 0; i < 1000; i++){
for (int a = 0; a < 7; a++)
{

int x = res.Next(str.Length);
randomstring = randomstring + str[x];
}
string file = @"codes.txt";
File.AppendAllText(file, $"{randomstring}\n");
Console.WriteLine("Random alphanumeric String:" + randomstring);
}

}
}
using System;
using System.IO;

class GFG{

public static void Main(string[] args)
{
Random res = new Random();

String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

String randomstring = "";
for (int i = 0; i < 1000; i++){
for (int a = 0; a < 7; a++)
{

int x = res.Next(str.Length);
randomstring = randomstring + str[x];
}
string file = @"codes.txt";
File.AppendAllText(file, $"{randomstring}\n");
Console.WriteLine("Random alphanumeric String:" + randomstring);
}

}
}
Yeah I changed it to append
12 replies