v5
This commit is contained in:
parent
a791408c56
commit
a541701c4f
61 changed files with 475 additions and 0 deletions
31
projects/CALCULATOR-ROOT/Program.cs
Normal file
31
projects/CALCULATOR-ROOT/Program.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CALCULATOR_ROOT
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string[] args2 = new string[2];
|
||||
args2[0] = args[0];
|
||||
if(args.Length == 1)
|
||||
{
|
||||
args2[1] = "2";
|
||||
} else
|
||||
{
|
||||
args2[1] = args[1];
|
||||
}
|
||||
string sep = Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator;
|
||||
args2[0] = args2[0].Replace(",", sep);
|
||||
args2[0] = args2[0].Replace(".", sep);
|
||||
args2[1] = args2[1].Replace(",", sep);
|
||||
args2[1] = args2[1].Replace(".", sep);
|
||||
Console.WriteLine(Math.Pow(Double.Parse(args2[0]), (1 / Double.Parse(args2[1]))));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue