Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Narcissist/C-sharp/narcissist.cs
Normal file
28
Task/Narcissist/C-sharp/narcissist.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
namespace Narcisisst
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
const string path = @"E:\Narcisisst";
|
||||
string[] thisFile = Directory.GetFiles(path , "Program.cs");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (string readLine in File.ReadLines(thisFile[0]))
|
||||
{
|
||||
sb.Append(readLine);
|
||||
sb.Append("\n");
|
||||
}
|
||||
|
||||
Console.WriteLine(sb);
|
||||
string input =String.Empty;
|
||||
input = Console.ReadLine();
|
||||
Console.WriteLine((Regex.IsMatch(sb.ToString(),input))?"accept":"reject");
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue