timmy2shoe57 0 Hi is there a way to generate numbers at end of string example giftcard is 300000000012345 is the a way to change just 12345 to random so output is 300000000067584 300000000098944 300000000043553 Any help i am great full Quote Share this post Link to post Share on other sites
crystals 19 here's the code in C# (dunno how to do it in notepad++) static void Main(string[] args) { Random random = new Random(); Console.WriteLine($"{3000000000}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}"); } or here is an actual program i made for you just for this objective https://anonfile.com/W9Q2E7m8b0/ConsoleApp13_exe Quote Share this post Link to post Share on other sites
Lain 0 here's the code in C# (dunno how to do it in notepad++) static void Main(string[] args) { Random random = new Random(); Console.WriteLine($"{3000000000}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}"); } or here is an actual program i made for you just for this objective https://anonfile.com/W9Q2E7m8b0/ConsoleApp13_exe Bad solution. This will: 1. Not loop (Maybe you added a loop to the .exe, but not this code.) 2. Return duplicates 3. Run Forever (Given you did loop it using while(true) or whatever.) Here's mine. for x in range(100000): print("300000000" + str(x).zfill(6)) Note: This solution uses python, but I can give an example in a variety of languages if you want. Quote Share this post Link to post Share on other sites
inShane 0 What language did you want it in? This can be easily accomplished in a variety of languages. It's essentially just generating random numbers. Quote Share this post Link to post Share on other sites
crystals 19 here's the code in C# (dunno how to do it in notepad++) static void Main(string[] args) { Random random = new Random(); Console.WriteLine($"{3000000000}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}{random.Next(10)}"); } or here is an actual program i made for you just for this objective https://anonfile.com/W9Q2E7m8b0/ConsoleApp13_exe Bad solution. This will: 1. Not loop (Maybe you added a loop to the .exe, but not this code.) 2. Return duplicates 3. Run Forever (Given you did loop it using while(true) or whatever.) Here's mine. for x in range(100000): print("300000000" + str(x).zfill(6)) Note: This solution uses python, but I can give an example in a variety of languages if you want. 1-3. there is a for loop in the .exe3 true this returns duplicates i'll just fix it later Quote Share this post Link to post Share on other sites