top of page

Culminacion de la Clase 2

  • Ybana Ventura Hector A.
  • 15 may 2019
  • 1 Min. de lectura

#include <iostream>

#include <math.h>

using namespace std;

double PI=3.1415,A,B,Z,R,Gt,Gr,Pt,R1,r1,M,F,T,t,J,K,INICIO_2,FINAL_2;

double POT_RES(double a,double b,int c,int d,double e); // Declaracion

int opcion,Lan,r,d,d1,d2,f,INICIO,FINAL,a0,n,b0;

double RADIO(int x,int y,int z,int q);

double FUN_TIE(int l,int m,double o,int p);

double FUN_TIE_2(int g,int h,double i,int j);

int main ()

{

cout<<"\n ***********MENU***********"<<endl;

cout<<"\n 1. Calculo de POT_RES "<<endl;

cout<<"\n 2. Calculo de .. "<<endl;

cout<<"\n 3. Calculo de funcion 1: \n";

cout<<"\n 4. Calculo de funcion 2: \n";

cout<<"\n Ingrese una opcion :";cin>>opcion;

switch(opcion)


{

case 1:

{

cout<<"Ganancia Trasnmitida: ";cin>> Gt;

cout<<"Ganancia Resivida: ";cin>> Gr;

cout<<"Longitud de Onda: ";cin>> Lan;

cout<<"Radio: ";cin>> r;

cout<<"Potencia Recibida: ";cin>> Pt;

R=POT_RES(Gt,Gr,Lan,r,Pt);

cout<<"La Potencia Recibida es: "<<R;

};break;

case 2:

{

cout<<"Inicio: ";cin>>INICIO;

cout<<"Final: ";cin>>FINAL;

cout<<"Distancia 1: ";cin>>d1;

cout<<"Distancia 2: ";cin>>d2;

cout<<"Distancia: ";cin>>d;

cout<<"Frecuencia: ";cin>>f;

for (d2=INICIO;d2<=FINAL;d2=d2+20)

{

r1=RADIO(d1,d2,d,f);

cout<<r1<<endl;

}

};break;

case 3:

cout<<"Ingrese a0: ";cin>>a0;

cout<<"Ingrese numero de vueltas: ";cin>>n;

cout<<"Ingrese periodo: ";cin>>T;

cout<<"Ingrese el tiempo: ";cin>>t;

{

F=FUN_TIE(a0,n,T,t);

cout<<"El valor de la funcion es:"<<F<<endl;

};break;

case 4:

{

cout<<"Ingrese el valor inicial: ";cin>>INICIO_2;

cout<<"Ingrese el valor final: ";cin>>FINAL_2;

cout<<"Ingrese b0: ";cin>>b0;

cout<<"Ingrese numero de vueltas: ";cin>>n;

cout<<"Ingrese la Periodo: ";cin>>T;

cout<<"Ingrese el tiempo: ";cin>>t;

for(t=INICIO_2;t<=FINAL_2;t=t+0.2)

{

J=FUN_TIE_2(b0,n,T,t);

cout<<" El resultado de la funcion 2 es: "<<J<<endl;

}

};break;

}

}//Fin del Programa




//Zona de Funciones

double POT_RES(double a,double b,int c ,int d,double e)

{

A=a*d*c*c*e;

B=16*PI*PI*d*d;

Z=A/B;

return Z;

}


double RADIO(int x,int y,int z,int q)

{

R1=17.32*sqrt((x*y)/(z*q));

return R1;

}


double FUN_TIE(int l,int m,double o,int p)

{

M=l*cos ((2*m*PI*p)/o);

return M;


}

double FUN_TIE_2(int g,int h,double i,int j)

{

K=g* sin ((2*h*PI*j)/i);

return K;

}





 
 
 

Entradas recientes

Ver todo
Evaluación 12

Métodos de Ordenamiento #include<iostream> #include<math.h> using namespace std; int i,A[10],r,axu,n,menor,j,k,a,inc,izquierda,derecha;...

 
 
 
Evaluación 11

Matrices Las matrices o como algunos las llaman "arreglos multidimensionales" son una estructura de datos bastante similar a los vectores...

 
 
 

Comentarios


©2019 by Mi Sitio. Proudly created with Wix.com

bottom of page