10-digit conversion and Matching Algorithm in parentheses: (if you have any bugs, please advise)
1: Convert decimal to other hexadecimal values, including binary, octal, and hexadecimal.
2: brackets matching algorithm, matching with corresponding brackets.
Hexadecimal conversion algorithm and character Matching Algorithm 1 using System. Collections. Generic;
2 using System. Text;
3
4 public partial class DataStruct_ExchangeData: System. Web. UI. Page
5 {
6 protected void Page_Load (object sender, EventArgs e)
7 {
8
9 // ConvertIntToOther ();
10 // ConvertionInt (654321,8 );
11 MatchBreak ("([]) ([] [()])");
12}
13 /// <summary>
14 // compare the match of the string
15 /// </summary>
16 /// <param name = "input"> input string to compare </param>
17 private void MatchBreak (string input)
18 {
19 char [] charnum = input. ToCharArray ();
20 Stack <string> stack = new Stack <string> ();
21 foreach (char ch in charnum ){
22 if (stack. Count = 0) {// press when the number is 0
23 stack. Push (ch. ToString ());
24}
25 else
26 {
27 & nbs