Beruflich Dokumente
Kultur Dokumente
using System;
using System.Collections.Generic;
using System.Text;
namespace Gauss_elimination
{
class Program
{
static void Main(string[] args)
{
// Declare and Initialize the variable
int i, j, n, k;
float[,] a = new float[10, 10];
float[,] e = new float[10, 10];
float[] x = new float[10];
float[] c = new float[10];
float[] c1 = new float[10];
float[] d = new float[10];
float[,] b = new float[10, 10];
}
}
for (i = 0; i < n - 2; i++)
{
d[i] = c[i];
}
for (i = 0; i < n; i++)
{
Console.WriteLine(d[i]);
}
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// Declare and Initialize the variable
int i, j, n, k,t,ite;
float [,]a =new float[10,10];
float []x = new float[10];
float[] b = new float[10];
float c;
//Iteration Process
for (t = 1; t<= ite; t++)
{
Console.WriteLine(" ");
Console.WriteLine("Iteration:{0}", t);
Console.WriteLine("______________");
for (i = 1; i <= n; i++)
{
c = b[i];
for (j = 1; j <= n; j++)
{
if (i != j)
{
c = c - a[i, j] * x[j];
}
}
for (k = 1; k <= n; k++)
if (i == k)
x[i] = c / a[i, k];
}
}
}
}