Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
code 1
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string left =""; string right =""; string temp =""; int num; string str5 = ""; string str6 = ""; string st1 = ""; string st2 = ""; string st3 = ""; int num2 = 0; // string str = "ABCDEFGHIJKLMNOPQRSTUVWXY"; //string str ="UBCDEFGHIJKLMNOPQRSTUUWXU"; string str ="1BC3EF2HIJKLMNOPQRST23WX1"; Console.WriteLine("str : "+str); string str2 = str.Substring(0, 3) + str.Substring(5, 2) + str.Substring(8, 1) + str.Substring(13, 3) + str.Substring(0x12, 1); Console.WriteLine("str2 : "+str2); string str3 = str.Substring(3, 2) + str.Substring(7, 1) + str.Substring(9, 4) + str.Substring(0x10, 2) + str.Substring(0x13, 1); Console.WriteLine("str3 : "+str3); string str4 = str.Substring(str.Length - 5, 5); Console.WriteLine("str4 : "+str4); if (str4.Substring(0, 1) != str2.Substring(4, 1)) { left = str4.Substring(0, 1); Console.WriteLine("left is : "+left); right = str2.Substring(4, 1); Console.WriteLine("right is : "+right); str4=str4.Replace(left,right); Console.WriteLine("now str2 : "+str2); Console.WriteLine("now str4 : "+str4); } if (str4.Substring(1, 1) != str3.Substring(0, 1)) { left = str4.Substring(1, 1); Console.WriteLine("left is : "+left); right = str3.Substring(0, 1); Console.WriteLine("right is : "+right); str4=str4.Replace(left,right); Console.WriteLine("now str2 : "+str2); Console.WriteLine("now str3 : "+str3); Console.WriteLine("now str4 : "+str4); } if (str4.Substring(str4.Length - 1, 1) != str2.Substring(0, 1)) { left = str4.Substring(str4.Length - 1, 1); Console.WriteLine("left is : "+left); right = str2.Substring(0, 1); Console.WriteLine("right is : "+right); str4=str4.Replace(left,right); Console.WriteLine("now str2 : "+str2); Console.WriteLine("now str3 : "+str3); Console.WriteLine("now str4 : "+str4); } Console.WriteLine("str3 lenth is : "+str3.Length); temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(0, 1)) - '0')); Console.WriteLine("1st part of str5 : "+temp); temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(0, 1)) - '0')); Console.WriteLine("2nd part of str5 : "+temp); temp=""; temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(1, 1)) - '0')); Console.WriteLine("1st part of str5 : "+temp); temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(1, 1)) - '0')); Console.WriteLine("2nd part of str5 : "+temp); temp=""; temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(2, 1)) - '0')); Console.WriteLine("1st part of str5 : "+temp); temp =Convert.ToString((int) (Convert.ToChar(str3.Substring(2, 1)) - '0')); Console.WriteLine("2nd part of str5 : "+temp); for (num = 0; num < str3.Length; num++) { str5 = str5 + Convert.ToString((int) (Convert.ToChar(str3.Substring(num, 1)) - '0')).Substring(Convert.ToString((int) (Convert.ToChar(str3.Substring(num, 1)) - '0')).Length - 1, 1); } Console.WriteLine("str5 : "+str5); Console.WriteLine("str2 lenth is : "+str2.Length); for (num = 0; num < str2.Length; num++) { str6 = str6 + Convert.ToString((int) Convert.ToChar(str2.Substring(num, 1))).Substring(Convert.ToString((int) Convert.ToChar(str2.Substring(num, 1))).Length - 1, 1); } Console.WriteLine("str6 : "+str6); if (str5 != str6) { } int num3 = 0; string str12 = ""; for (num = 0; num < str3.Length; num++) { num3 = Convert.ToChar(str3.Substring(num, 1)); str12 = Convert.ToString((int) (Convert.ToChar(str3.Substring(num, 1)) - '0')).Substring(Convert.ToString((int) (Convert.ToChar(str3.Substring(num, 1)) - '0')).Length - 1, 1); num2 += Convert.ToInt32(str12); } Console.WriteLine("str12 : "+str12); str5 = num2.ToString(); str4 = str4.Substring(2, 2); str4 = Convert.ToString((int) (Convert.ToChar(str4.Substring(0, 1)) - '0')).Substring(Convert.ToString((int) (Convert.ToChar(str4.Substring(0, 1)) - '0')).Length - 1, 1) + Convert.ToString((int) (Convert.ToChar(str4.Substring(1, 1)) - '0')).Substring(Convert.ToString((int) (Convert.ToChar(str4.Substring(1, 1)) - '0')).Length - 1, 1); if (str5 != str4) { } Console.WriteLine("str5 : "+str5); Console.WriteLine("str4 : "+str4); } } }
run
|
edit
|
history
|
help
0
https://www.usgatmtu.mtu.edu/profile/watch-the-bad-guys-online-streaming/profile
asxsdf
Fórum ➡ Aggregating 2 compatible dictionaries, using LINQ ♦
look at this, soaches
Teste
miner
Floating point arithmetics
1 -5 6 x1=3 x2=2
TEst1
Lambda Expressions Are Cool