v5
This commit is contained in:
parent
a791408c56
commit
a541701c4f
61 changed files with 475 additions and 0 deletions
23
projects/CALCULATOR/Program.cs
Normal file
23
projects/CALCULATOR/Program.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using static System.Math;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
|
||||
namespace CALCULATOR
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string sep = ".";
|
||||
string calculation = String.Join(" ", args).Replace(",", sep).Replace(".", sep);
|
||||
string resultString = new DataTable().Compute(calculation, null).ToString();
|
||||
int result = Int32.Parse(resultString);
|
||||
Console.WriteLine(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue