Problema 1
Codigo C++
// Practica 3 Problema 1 12 de Septiembre de 2012// Hector Leyva Serrano y Saul Rojas Beaven
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
float x=1.672,y=14.65,z=1.845,w=2.45;
cout<<"2*y*e(w-z))= "<<2*y*exp(w-z)<<endl;
cout<<"x*sqrt(y)+pow(x,3)= "<<x*sqrt(y)+pow(x,3)<<endl;
cout<<"32.0*z/sqrt(1.33)(x)= "<<32.0*z/sqrt(1.33)*(x)<<endl;
cout<<"100.0/y(e(2.66))+z= "<<100.0/y*(exp(2.66))+z<<endl;
cout<<"8.86(e(2w)+4x= "<<8.86*(exp(2*w))+4*x<<endl;
getch();
}
Pseudocodigo
iniciox=1.672,y=14.65,z=1.845,w=2.45 float
print "2*y*e(w-z))= ",2*y*exp(w-z)
print "x*sqrt(y)+pow(x,3)= ",x*sqrt(y)+pow(x,3)
print "32.0*z/sqrt(1.33)(x)= "<<32.0*z/sqrt(1.33)*(x)
print "100.0/y(e(2.66))+z= "<<100.0/y*(exp(2.66))+z
print "8.86(e(2w)+4x= "<<8.86*(exp(2*w))+4*x
Fin
Problema 2
Codigo C++
// Practica 3 Problema 2 12 de Septiembre de 2012// Hector Leyva Serrano y Saul Rojas Beaven
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
int a=11,b=65,c=18,d=2;
cout<<"(b2)/(a2)= "<<pow(b,2)/pow(a,2)<<endl;
cout<<"2(cd)4= "<<2*pow((c*d),4)<<endl;
cout<<"c2/(a+d)= "<<pow(c,2)/(a+d)<<endl;
cout<<"23c/sqrt(8)(a+d)2= "<<23*c/sqrt(8)*pow((a+d),2)<<endl;
cout<<"15(a)/sqrt(3)(d)3= "<<15*(a)/sqrt(3)*pow(d,3)<<endl;
getch();
}
Pseudocodigo
inicioa=11,b=65,c=18,d=2 int
print "(b2)/(a2)= ",pow(b,2)/pow(a,2)
print "2(cd)4= ",2*pow((c*d),4)
print "c2/(a+d)= ",pow(c,2)/(a+d)
print "23c/sqrt(8)(a+d)2= ",23*c/sqrt(8)*pow((a+d),2)
print "15(a)/sqrt(3)(d)3= ",15*(a)/sqrt(3)*pow(d,3)
Fin
Problema 3
Codigo C++
//Practica No. 3 Problema No. 3 Fecha:12/sep/12//
//Nombre: Rojas Beaven Saul Y Hector Leyva Serrano//
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
float v1=7.3, v2=8.5, f1=110, f2=90, v1s=0.0, v2s=0.0, sv=0.0;
v1s=120*v1/0.33*f1;
v2s=110*v2/0.56*pow(f2,2);
sv=v1s+v2s;
cout<<"Voltaje de salida circuito 1 = "<<v1s<<endl;
cout<<"Voltaje de salida circuito 2 = "<<v2s<<endl;
cout<<"Suma de voltajes = "<<sv<<endl;
getch();
}
Pseudocodigo
iniciov1=7.3, v2=8.5, f1=110, f2=90, v1s=0.0, v2s=0.0, sv=0.0 float
v1s=120*v1/0.33*f1
v2s=110*v2/0.56*pow(f2,2)
sv=v1s+v2s
print "Voltaje de salida circuito 1 = ",v1s
print "Voltaje de salida circuito 2 = ",v2s
print "Suma de voltajes = ",sv
Fin
Problema 4
Codigo en C++
//Practica No. 3 Problema No. 4 Fecha:12/sep/12////Nombre: Rojas Beaven Saul Y Hector Leyva Serrano//
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
float poblacion=6.0*exp(0.2*(2012-2000));
cout<<"La poblacion mundial en milliones de personas es: "<<poblacion<<endl;
getch();
}
Pseudocodigo
iniciopoblacion=6.0*exp(0.2*(2012-2000)) float
print "La poblacion mundial en milliones de personas es: ",poblacion
Fin
Problema 5
Codigo C++
//Practica No. 3 Problema No. 5 Fecha:12/sep/12//
//Nombre: Rojas Beaven Saul Y Hector Leyva Serrano//
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
double r=8, rad=35*3.1416/180, x=0.0 , y=0.0;
x=r*sin(rad);
y=r*cos(rad);
cout<<"El valor de las cordenadas polares son: "<<endl;
cout<<"x = "<<x<<endl;
cout<<"y = "<<y<<endl;
getch();
}
Pseudocodigo
//Practica No. 3 Problema No. 5 Fecha:12/sep/12//
//Nombre: Rojas Beaven Saul Y Hector Leyva Serrano//
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
r=8, rad=35*3.1416/180, x=0.0 , y=0.0 print
x=r*sin(rad);
y=r*cos(rad);
print "El valor de las cordenadas polares son: "<<endl;
print "x = "<<x<<endl;
print "y = "<<y<<endl;
Fin
Problema 6
Codigo en C++
//Practica No. 3 Problema No. 6 Fecha:12/sep/12//
//Nombre: Rojas Beaven Saul Y Hector Leyva Serrano//
#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
float r1=1000.0, r2=1200.0, r3=1500.0, r4=1800.0, rc=0.0;
rc=1/(1/r1+1/r2+1/r3+1/r4);
cout<<"Las resistencias en paralelo son: "<<endl;
cout<<"r1=1000 Ohm, r2=1200 Ohm, r3=1500 Ohm, r4=1800 Ohm "<<endl;
cout<<"El Circuito en paralelo tiene la resistencia total = "<<rc<<" Ohm"<<endl;
getch();
}
Pseudocodigo
inicio
r1=1000.0, r2=1200.0, r3=1500.0, r4=1800.0, rc=0.0 float
rc=1/(1/r1+1/r2+1/r3+1/r4)
print "Las resistencias en paralelo son: "
print "r1=1000 Ohm, r2=1200 Ohm, r3=1500 Ohm, r4=1800 Ohm "
print "El Circuito en paralelo tiene la resistencia total = ",rc<<" Ohm"
Fin






No hay comentarios:
Publicar un comentario