Me ayudan por que no imprime nada mi programa
Publicado por Jorge (24 intervenciones) el 02/04/2020 08:25:12
Muy raro por que deberia aunque sea llegar al printf, por eso pienso que es una cuestion como poner el getch o el system("pause") pero lo intente y nada que sucede ? Todos esos for son para automatizar la eliminacion gaussiana de un sistema 3x3 con diferentes valores
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include <stdio.h>
#include <iostream>
#include <conio.h>
main()
{
int a=1,b=1,c=1,d=1,e=1,f=1,g=1,h=1,i=1,in=2,fn=5,in2=5,fn2=8,in3=7,fn3=9,ec11=0,ec12=0,ec13=0,ec21=0,ec22=0,ec23=0,j=1,k=1,m=1;
float x=0,y=0,z=0,s1=0,s2=0,s3=0;
for(a=in;a<=fn;a++)
{
for(b=in;b<=fn;b++)
{
for(c=in;c<=fn;c++)
{
for(d=in;d<=fn;d++)
{
for(e=in2;e<=fn2;e++)
{
for(f=in2;f<=fn2;f++)
{
for(g=in2;g<=fn2;g++)
{
for(h=in2;h<=fn2;h++)
{
for(i=in3;i<=fn3;i++)
{
for(j=in3;j<=fn3;j++)
{
for(k=in3;k<=fn3;k++)
{
for(m=in3;m<=fn3;m++)
{
ec11=( -(i)*f) + (e*j);
ec12=( -(i)*g) + (e*k);
ec13=( -(i)*h) + (e*m);
ec21=( -(a)*f) + (e*b);
ec22=( -(a)*g) + (e*c);
ec23=( -(a)*h) + (e*d);
z= ( (-(ec21)*ec13) + (ec11*ec23) ) / ( (-(ec21)*ec12) + (ec11*ec22) );
y= (-ec11+z)/(ec12);
x= ( -(b*y)-(c*z)+d);
s1= (a*x) + (b*y) + (c*z);
s2= (e*x) + (f*y) + (g*z);
s3= (i*x) + (j*y) + (k*z);
if(ec11=0||ec12==0||ec13==0||ec21==0||ec22==0||ec23==0||z==0||y==0||x==0||s1==0||s2==0||s3==0) continue;
if(s1==d&&s2==h&&s3==m)
{
printf("El SISTEMA: \t %d \t + \t %d \t + \t %d \t = \t %d",a,b,c,d);
printf(" \t %d \t + \t %d \t + \t %d \t = \t %d",e,f,g,h);
printf(" \t %d \t + \t %d \t + \t %d \t = \t %d",i,j,k,m);
printf("TIENE SOLUCION UNICA");
}
printf("El SISTEMA: \t %d \t + \t %d \t + \t %d \t = \t %d",a,b,c,d);
printf(" \t %d \t + \t %d \t + \t %d \t = \t %d",e,f,g,h);
printf(" \t %d \t + \t %d \t + \t %d \t = \t %d",i,j,k,m);
printf("COINCIDE EN TAL: \t %f \t = \t %d",s1,d);
printf(" \t %f \t = \t %d",s2,h);
printf(" \t %f \t = \t %d",s3,m);
putchar('\n');
putchar('\n');
putchar('\n');
}
}
}
}
}
}
}
}
}
}
}
}
getch();
system("pause");
}
Valora esta pregunta


0