summary refs log tree commit diff
path: root/string_guess/Program.cs
diff options
context:
space:
mode:
author1970-01-01 00:00:00 +0000
committer2025-01-08 04:13:03 +0000
commit821ecea5b3a6aea15494dd8e9674fac379a2e841 (patch)
tree54ea2e3ce80bf69607726fd8c1e83e76ea3eb63b /string_guess/Program.cs
parentread/write (diff)
downloadcs-821ecea5b3a6aea15494dd8e9674fac379a2e841.tar
cs-821ecea5b3a6aea15494dd8e9674fac379a2e841.tar.gz
cs-821ecea5b3a6aea15494dd8e9674fac379a2e841.tar.bz2
cs-821ecea5b3a6aea15494dd8e9674fac379a2e841.tar.xz
cs-821ecea5b3a6aea15494dd8e9674fac379a2e841.zip
string guess
Diffstat (limited to 'string_guess/Program.cs')
-rw-r--r--string_guess/Program.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/string_guess/Program.cs b/string_guess/Program.cs
new file mode 100644
index 0000000..c8ad2ce
--- /dev/null
+++ b/string_guess/Program.cs
@@ -0,0 +1,22 @@
+using System;

+

+Random r = new Random();

+string s = "";

+string keypress = "";

+

+for(int i = 0; i < 6; i++)

+{

+	Console.Clear();

+	for(int j = 0; j <= i; j++)

+		//s += r.Next(10);

+		s += ((char)r.Next(65, 90));

+	Console.Write(s);

+	Thread.sleep(2000);

+	Console.Clear();

+	keypress = Console.ReadLine();

+	Console.Clear();

+	if(s != keypress) return;

+	Console.Write("Success");

+	Thread.Sleep(1000);

+	s = "";

+}