Sunteți pe pagina 1din 2

#include <iostream>

#include <math.h>

using namespace std;

void menu();
int SisLineal(double a1, double a2,double b1,double b2,int SL);
int SisNoLineal(double a1, double a2,double b1,double b2,string dx,string dy,
double pcx,double pcy);
int creditos();
int Salida();

int start(){
menu();
}

void menu(){
system("title PROYECTO SEGUNDO CORTE [SISTEMAS DINAMICOS]");
int control=0;
do{
menu:
{
system("color 02");

cout<<"____________________________________________________________"<<endl;
cout<<"\t\t\t\t\t[MENU]"<<endl;

cout<<"\t____________________________________________________"<<endl;
cout<<"\t|1>SISTEMA LINEAL X'= aX+bY Y'=
cX+dY.............|"<<endl;
cout<<"\t|2>SISTEMA NO LINEAL X'= F(x,y) Y'=
G(x,y).........|"<<endl;
cout<<"\t|
3>CREDITOS........................................|"<<endl;
cout<<"\t|
4>SALIR...........................................|"<<endl;
cout<<"\t|Ingrese una opcion: ";
cin>>control;
system("cls");
}
}while(control<=0||control>=5);

switch(control){
case 1:{
double a1=0,a2=0,b2=0,b1=0;

SisLineal(a1,a2,b2,b1,1);
break;
}
case 2:{
double a1=0,a2=0,b2=0,b1=0;
double pcx=0,pcy=0;
string dx,dy;

SisNoLineal(a1,a2,b1,b2,dx,dy,pcx,pcy);
break;
}
case 3:{
creditos();
break;
}
case 4:{
Salida();
break;
}
}
}

int SisLineal(double a1, double a2,double b1,double b2,int SL){


double det=a1*b2-(a2*b1);
if(det == 0){
cout<<"P(0,0) NO ES UNICO";
} else{
double T=a1+b2;
if((T*T)-(4*det)<0){
if(T==0){
if(SL==1) cout<<"ES UN ->CENTRO<- [ESTABLE] - SUMIDERO -";
if(SL==2) cout<<"NO TIENE REPRESENTACION";
}
if(T<0) cout<<"ES UN ->FOCO<- [ASINTOTICAMENTE ESTABLE] -
SUMIDERO -";
if(T>0) cout<<"ES UN ->FOCO<- [INESTABLE] - FUENTE -";
}
else if(det<0) cout<<"ES UNA ->SILLA<- [INESTABLE] - FUENTE -";
else{
if(T<0) cout<<"ES UN ->NODO<- [ESTABLE] - SUMIDERO -";
if(T>0) cout<<"ES UN ->NODO<- [INESTABLE] - FUENTE -";
}
}
}
int SisNoLineal(double a1, double a2,double b1,double b2,string dx,string dy,
double pcx,double pcy){
cout<<"EL PUNTO CRITICO P("<<pcx<<","<<pcy<<"); ";
SisLineal(a1,a2,b1,b2,2);
cout<<" EN EL SISTEMA NO LINEAL \nX' = "<<dx<<"\nY' = "<<dy<<endl;

}
int creditos(){

}
int Salida(){
}

S-ar putea să vă placă și