Example #1
0
 private void btnTinh_Click(object sender, EventArgs e)
 {
     string strInput = txtInput.Text;
     string[] matran=strInput.Split(',');
     int n = matran.Length;
     int[] arr = new int[n];
     //for (int i = 0; i < n;i++ )
     //{
     //    arr[i] = int.Parse(matran[i]);
     //}
     int error = convertStringArraryToIntArrary(matran, out arr);
     Tinhtong_n_so tinhtong = new Tinhtong_n_so();
     if (error==-1)
     {
         return;
     }
     txtOutput.Text=tinhtong.tongn(arr, n).ToString();
 }
Example #2
0
 static void Main(string[] args)
 {
     Tinhtong_n_so ttn = new Tinhtong_n_so();
     ttn.nhapn();
     ttn.hienthi();
 }