Народ,подскажите,где ошибка? - C#
Формулировка задачи:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double a=2, b=4, c=5, la, lb, lc;
la = Math.Sqrt(a * b * c * (a + b + c)) / (a + b);
Console.WriteLine("la=");
lb = Math.Sqrt(a * c * (a + b + c) * (a + b + c)) / (a + c);
Console.WriteLine("lb=");
lc = Math.Sqrt(c * b * (a + b + c) * (a + b - c)) / (c + b);
Console.WriteLine("lc=");
Console.ReadKey();
}
}
}Решение задачи: «Народ,подскажите,где ошибка?»
textual
Листинг программы
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double a=2, b=4, c=5, la, lb, lc;
la = Math.Sqrt(a * b * c * (a + b + c)) / (a + b);
Console.WriteLine("la=");
Console.WriteLine(la.ToString());
lb = Math.Sqrt(a * c * (a + b + c) * (a + b + c)) / (a + c);
Console.WriteLine("lb=");
Console.WriteLine(lb.ToString());
lc = Math.Sqrt(c * b * (a + b + c) * (a + b - c)) / (c + b);
Console.WriteLine("lc=");
Console.WriteLine(lc.ToString());
Console.ReadKey();
}
}
}