jueves, 1 de noviembre de 2012

Practica 6

Problema 1

//Practica 6 Problema 1     Fecha: 26/09/2012
//Integrantes del equipo: Leonardo Rene Fraire Garcia  Calderon Hernandez Hugo
#include <iostream.h>
#include <conio.h>
int main ()
{
float P1=22.0, P2=32.0, P3=10.99, P4=15.75, P5=19.75;
int C1=0,C2=0,C3=0,C4=0,C5=0;
float subtotal=0.0;
float descuento=0.0;
float total=0.0;
cout<<"Cantidad productos 1= ";
cin>>C1;
cout<<"Cantidad productos 2= ";
cin>>C2;
cout<<"Cantidad productos 3= ";
cin>>C3;
cout<<"Cantidad productos 4= ";
cin>>C4;
cout<<"Cantidad productos 5= ";
cin>>C5;
subtotal=P1*C1+P2*C2+P3*C3+P4*C4+P5*C5;
cout<<" tipo de producto\t precio del producto\t subtotal de producto "<<endl;

cout<<"Producto 1\t\t\t"<<P1<<"\t\t\t"<<(P1*C1)<<endl;

cout<<"Producto 2\t\t\t"<<P2<<"\t\t\t"<<(P2*C2)<<endl;

cout<<"Producto 3\t\t\t"<<P3<<"\t\t\t"<<(P3*C3)<<endl;

cout<<"Producto 4\t\t\t"<<P4<<"\t\t\t"<<(P4*C4)<<endl;

cout<<"Producto 5\t\t\t"<<P5<<"\t\t\t"<<(P5*C5)<<endl;

cout<<"__________________________________________________________________________"<<endl;
cout<<"\n\tSubtotal="<<subtotal<<"\n"<<endl;
if(subtotal>=500.0&&subtotal<=1000.0)
{
descuento=subtotal*0.03;
}
else
{
if(subtotal>=1001.0&&subtotal<=7000.0)
{
descuento=subtotal*0.06;
}
else
{
if(subtotal>=7001.0&&subtotal<=15000.0)
{
descuento=subtotal*0.12;
}
else
{
if(subtotal>15000.0)
{
descuento=subtotal*0.20;
}
}
}
}
cout<<"\tDescuento aplicado= "<<descuento<<"\n"<<endl;
total=subtotal-descuento;
cout<<"\tEl total es="<<total<<endl;
getch ();
return 0;
}



Problema 2








Problema 3




//Practica 6 Problema 2     Fecha: 26/09/2012
//Integrantes del equipo: Leonardo Rene Fraire Garcia  Calderon Hernandez Hugo
#include <iostream.h>
#include <conio.h>
int main ()
{
float Precio_total=0.0;
float Precio_basico=0.0;
float Impuesto=0.0;
char sigue='s';
while(sigue=='s'||sigue=='S')
{
cout<<"costo basico del articulo= "<<endl;
cin>>Precio_basico;
if(Precio_basico>=0&&Precio_basico<=20)
{
Impuesto=0.0;
}
else
{
if(Precio_basico>20&&Precio_basico<=40)
{
Impuesto=(Precio_basico)*(0.30);
}
else
{
if(Precio_basico<500)
{
Impuesto=(Precio_basico)*(0.40);
}
else
{
Impuesto=(Precio_basico)*(0.50);
}}}
Precio_total=Precio_basico+Impuesto;
cout<<"Precio total= "<<Precio_total<<endl;
cout<<"desea continuar S/N=?";
cin>>sigue;
clrscr();
}

getch ();
return 0;
}

 






Problema 4









Problema 5





Problema 6

//Practica 6 Problema 6    Fecha: 26/09/2012
//Integrantes del equipo: Leonardo Rene Fraire Garcia  Calderon Hernandez Hugo
#include <iostream.h>
#include <conio.h>
int main ()

{
float t=0.0;
char sigue='s';
while(sigue=='s'||sigue=='S')
{
cout<<"introduzca la tolerancia ->";
cin>>t;
if(t<0.1)
{ cout<<"exploracion espacial"<<endl;}
else
{if(t>=0.1&&t<1)
{ cout<<"grado militar"<<endl;}
else
{ if(t>=1&&t<5)
{cout<<"Grado comercial"<<endl;}
else
{ if(t>=5)
{cout<<"Grado de juguete"<<endl;}
}}}
}cout<<"desea continuar S/N=?";
cin>>sigue;
clrscr();


getch ();
return 0;
}




Problema 7

 


Problema 8





Problema 9






Problema 10







Problema 11







Problema 12




No hay comentarios:

Publicar un comentario