|
Determinantenverfahren und Laplace´scher Entwicklungssatz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Cramersche_Regel
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("tttDie Cramersche Regel");
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("Formel:");
Console.WriteLine("ax + ay + az = ad");
Console.WriteLine("bx + by + bz = bd");
Console.WriteLine("cx + cy + cz = cd");//(1)
double ax, bx, cx;
double ay, by, cy;
double az, bz, cz;
double ad, bd, cd;
double D, Dx, Dy, Dz;//(2)
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("Geben Sie alle x-Werte ein ein!");
Console.WriteLine();
ax = Convert.ToDouble(Console.ReadLine());
bx = Convert.ToDouble(Console.ReadLine());
cx = Convert.ToDouble(Console.ReadLine());//(3)
Console.WriteLine();
Console.WriteLine("Geben Sie alle y-Werte ein!");
Console.WriteLine();
ay = Convert.ToDouble(Console.ReadLine());
by = Convert.ToDouble(Console.ReadLine());
cy = Convert.ToDouble(Console.ReadLine());//(4)
Console.WriteLine();
Console.WriteLine("Geben Sie alle z-Werte ein!");
Console.WriteLine();
az = Convert.ToDouble(Console.ReadLine());
bz = Convert.ToDouble(Console.ReadLine());
cz = Convert.ToDouble(Console.ReadLine());//(5)
Console.WriteLine();
Console.WriteLine("Geben Sie alle d-Werte ein!");
Console.WriteLine();
ad = Convert.ToDouble(Console.ReadLine());
bd = Convert.ToDouble(Console.ReadLine());
cd = Convert.ToDouble(Console.ReadLine());//(6)
Console.WriteLine();
Console.WriteLine();
D = ax * (by * cz - bz * cy) - ay * (bx * cz - bz * cx) + az * (bx * cy - by * cx);
Console.Write(" D = " + D);
Console.WriteLine();
Dx = ad * (by * cz - bz * cy) - ay * (bd * cz - bz * cd) + az * (bd * cy - by * cd);
Console.Write(" Dx = " + Dx);
Console.WriteLine();
Dy = ax * (bd * cz - bz * cd) - ad * (bx * cz - bz * cx) + az * (bx * cd - bd * cx);
Console.Write(" Dy = " + Dy);
Console.WriteLine();
Dz = ax * (by * cd - bd * cy) - ay * (bx * cd - bd * cx) + ad * (bx * cy - by * cx);//(7)
Console.Write(" Dz = " + Dz);
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("x = " + Dx / D);
Console.WriteLine();
Console.WriteLine("y = " + Dy / D);
Console.WriteLine();
Console.WriteLine("z = " + Dz / D);//(8)
Console.ReadLine();
}
}
}
Peter und Philipp |
|
|
|
|
|
|
|
|
Letzte Änderung: 25.09.2007
© Pädagogisches Institut für die deutsche Sprachgruppe
- Bozen. 2000 -
|
|
|
|
|
|
|
|
|