@UFO/denklem
C++

No description

Files
  • main.cpp
main.cpp
#include<stdio.h>

int c,t,m;
float d,b,f,vi[71][143];
int v,i,j,a,x;

main() { kson:

printf(" KA€LIK DENKLEM C™ZšLECEK....");scanf("%d",&a);
if (a>70) goto kson;
i=1;
while (i<=a) { j=1;
while (j<=a) {
printf(" a%d X %d %d ......:",a,i,j);scanf("%f",&b);vi[i][j]=b;
j++; } i++; }

for (i=1;i<=a;i++) { for (j=1;j<=a;j++) {
vi[i][j+a]=0;if (i==j) { vi[i][j+a]=1; } } }

x=1;
while (x <= a) {i=1;
while(i <= (2*a)) {
if (x != i) {
d=(vi[i][x]/vi[x][x]);j=x;
while (j<=(2*a)) { vi[i][j]=(vi[i][j]-(vi[x][j]*d));j++; }
} i++; } x++; }
for (i=1;i<=a;i++) { for (j=1;j<=a;j++) {
vi[i][j+a]= (vi[i][j+a]/vi[i][i]);printf(" %.5f",vi[i][j+a]); }
printf("\n"); }

tson:for (i=1;i<=a;i++) { printf("verx%d...:",i);scanf("%f",&b);
vi[i][(2*a)+1]=b ; vi[i][(2*a)+2]=0; }
for (i=1;i<=a;i++) { for (j=1;j<=a;j++) {

vi[i][2*a+2]=vi[i][2*a+2]+(vi[i][j+a]*vi[j][2*a+1]); }
printf("X%d ... - %f - ......=%f\n",i,vi[i][(2*a)+1],vi[i][(2*a)+2]); }

printf("DEMK X SON ˜SE { 0 } VER....:");scanf("%d",&c);
if (c!=0) goto tson;


printf("SON ˜SE TERS MATRIS { 0 } VER....:");scanf("%d",&c);
if (c!=0) goto kson;


}
gcc version 4.6.3