using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AkiragestuProject { /// /// 基本计算类 /// class akOperation { akMood akm = new akMood(); /// /// 加法 /// /// /// /// public string Addition(string Addstr) { string[] Arr = Addstr.Split('+'); int cstr = 0; foreach(var a in Arr) { cstr+= Convert.ToInt32(a); } return cstr.ToString(); } /// /// 减法 /// /// /// /// public string Subtraction(int f1, int f2) { int c = f1 - f2; var cstr = c.ToString(); return cstr; } /// /// 乘法 /// /// /// /// public string Multiplication(int f1, int f2) { int c = f1 * f2; var cstr = c.ToString(); return cstr; } /// /// Division /// /// /// /// public string Division(int f1, int f2) { int c = f1 / f2; var cstr = c.ToString(); return cstr; } } }