Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text.RegularExpressions;
- public class Program
- {
- private static readonly Regex regex = new Regex(@"^\d+$");
- public static void Main()
- {
- List<String> toSend = new List<String>();
- String ae = "";
- Console.WriteLine("Enter a number!!!! (!!!)");
- String a = Console.ReadLine();
- if (!regex.IsMatch(a)) {
- Console.WriteLine("That isnt a number!");
- return;
- }
- int b = Int32.Parse(a);
- Console.WriteLine("You specified: " + a + " a's! I will now print them!");
- for (int i = 0; i < b; i++) {
- toSend.Add("a");
- }
- ae += "[";
- foreach (String s in toSend) {
- ae+="\"a\", ";
- }
- ae = ae.Substring(0, ae.LastIndexOf(","));
- ae += "]";
- Console.WriteLine(ae + "\nDone!!!!!!!!!!!!!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement