#include<iostream>
#include<conio.h>
using namespace std;
int main (){
int opcion,opcion2,opcion3,i;
int total,cantidad,tot2,pago, cam,num,num2, tol;
do{
do{
cout<<"***Tienda***"<<endl;
cout<<"Menu"<<endl;
cout<<"1.Ver Productos"<<endl;
cout<<"2.Cotizar Productos"<<endl;
cout<<"3.Comprar Productos"<<endl;
cout<<"4.Salir"<<endl;
cout<<"Escoge una opcion: "<<endl;
cin>>opcion;
if(opcion==4){
opcion2=4;
}
switch(opcion){
case 1: {
cout<<"dame un valor que deseas contar"<<endl;
cin>>num;
cout<<"de cuanto deseas que sea el salto"<<endl;
cin>>num2;
for(i=0;i<=num;i=i+num2)
cout<<i<<endl;
do{
cout<<"*** Elige a el departamento *** "<<endl;
cout<<"1.- Electronica "<<endl;
cout<<"2.- Muebles "<<endl;
cout<<"3.- Regresar al menu "<<endl;
cin>>opcion2;
if(opcion2==3){
opcion3=6;
}
switch(opcion2){
case 1:{
cout<<"*** Electronica ***"<<endl;
cout<<"Smartphone $6,500"<<endl;
cout<<"Pantalla $5,000"<<endl;
cout<<"Dvd $1,500"<<endl;
cout<<"Consola Xbox One $7,600"<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
break;
}
case 2:{
cout<<"*** Muebles ***"<<endl;
cout<<"Sala $9,000 "<<endl;
cout<<" Comedor $3,500 "<<endl;
cout<<"Cocina $8,000"<<endl;
cout<<"Cama Matrimonial $6,600"<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
break;
}
}
}while(opcion3<6);
break;
}
case 2:{
do{
cout<<"*** Elige a el departamento *** "<<endl;
cout<<"1.- Electronica "<<endl;
cout<<"2.- Muebles "<<endl;
cout<<"3.- Regresar al menu "<<endl;
cin>>opcion2;
if(opcion2==3){
opcion3=6;
}
switch(opcion2){
case 1:{
cout<<"***Cotizacion del departamento de Electronica***"<<endl;
cout<<"Presiona el numero del producto que deseas cotizar: "<<endl;
cout<<"1.- Smartphone $6,500"<<endl;
cout<<"2.- Pantalla $5,000"<<endl;
cout<<"3.- Dvd $1,500 "<<endl;
cout<<"4.- Consola Xbox One $7,600"<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
if(opcion3==1){
cout<<"¿Cuantos Smartphone deseas? "<<endl;
cin>>cantidad;
total=cantidad*6500;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==2){
cout<<"¿Cuantas pantallas deseas? "<<endl;
cin>>cantidad;
total=cantidad*5000;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==3){
cout<<"¿Cuantos Dvd deseas? "<<endl;
cin>>cantidad;
total=cantidad*1500;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==4){
cout<<"¿Cuantos Xbox One deseas? "<<endl;
cin>>cantidad;
total=cantidad*7600;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}
}
}
}
break;
}
case 2: {
cout<<"***Cotizacion del departamento de Muebles***"<<endl;
cout<<"Presiona el numero del producto que deseas cotizar: "<<endl;
cout<<"1.- Sala $9,000"<<endl;
cout<<"2.- _Comedor $3,500"<<endl;
cout<<"3.- Cocina $8,000"<<endl;
cout<<"4.- Cama matrimonial $6,000"<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
if(opcion3==1){
cout<<"¿Cuantas salas deseas? "<<endl;
cin>>cantidad;
total=cantidad*9000;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==2){
cout<<"¿Cuantos comedores deseas? "<<endl;
cin>>cantidad;
total=cantidad*3500;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==3){
cout<<"¿Cuantas cocinas deseas? "<<endl;
cin>>cantidad;
total=cantidad*8000;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}else{
if(opcion3==4){
cout<<"¿Cuantas camas matrimoniales deseas? "<<endl;
cin>>cantidad;
total=cantidad*6000;
cout<<"Tu cantidad a pagar seria de: "<<total<<endl;
}
}
}
}
break;
}
}
}while(opcion3<6);
break;
}
case 3:{
do{
cout<<"*** Elige a el departamento *** "<<endl;
cout<<"1.- Electronica "<<endl;
cout<<"2.- Muebles "<<endl;
cout<<"3.- Regresar al menu "<<endl;
cin>>opcion2;
if(opcion2==3){
opcion3=6;
}
switch(opcion2){
case 1:{
cout<<"***Realizar la compra del departamento de Electronica***"<<endl;
cout<<"1.- Smartphone $6,500"<<endl;
cout<<"2.- Pantalla $5,000"<<endl;
cout<<"3.- Dvd $1,500 "<<endl;
cout<<"4.- Consola Xbox One $7,600"<<endl;
cout<<"Elige el producto "<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
if(opcion3==1){
cout<<"¿Cuantos Smartphone deseas adquirir? "<<endl;
cin>>cantidad;
total=cantidad*6500;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==2){
cout<<"¿Cuantas pantallas deseas? "<<endl;
cin>>cantidad;
total=cantidad*5000;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==3){
cout<<"¿Cuantos Dvd deseas ? "<<endl;
cin>>cantidad;
total=cantidad*1500;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==4){
cout<<"¿ Cuantos Xbox One deseas? "<<endl;
cin>>cantidad;
total=cantidad*7600;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}
}
}
}
break;
}
case 2: {
cout<<"***Realizar compra del departamento Muebles ***"<<endl;
cout<<"1.- Sala $9,000"<<endl;
cout<<"2.- _Comedor $3,500"<<endl;
cout<<"3.- Cocina $8,000"<<endl;
cout<<"4.- Cama matrimonial $6,000"<<endl;
cout<<"Elige un producto"<<endl;
cout<<"Presione 1 para regresar"<<endl;
cin>>opcion3;
if(opcion3==1){
cout<<"¿Cuantas salas deseas? "<<endl;
cin>>cantidad;
total=cantidad*9000;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==2){
cout<<"¿Cuantos comedores deseas? "<<endl;
cin>>cantidad;
total=cantidad*3500;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==3){
cout<<"¿Cuantas cocinas deseas? "<<endl;
cin>>cantidad;
total=cantidad*8000;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}else{
if(opcion3==4){
cout<<"¿Cuantas camas matrimoniales deseas? "<<endl;
cin>>cantidad;
total=cantidad*6000;
cout<<"Tu cantidad a pagar es de: "<<total<<endl;
cout<<"Introduce tu pago "<<endl;
cin>>pago;
tot2=pago-total;
if (tot2==total){
cout<<"Gracias por tu compra"<<endl;
}
if (tot2>total){
cam=tot2-total;
cout<<"Tu cambio es de: "<<cam<<endl;
}
if (tot2<total){
cam=total-tot2;
cout<<"Falta por pagar: "<<cam<<endl;
}
}
}
}
}
break;
}
}
}while(opcion3<6);
break;
}
}
}while(opcion2<4);
}while(opcion!=4);
getch();
}
No hay comentarios:
Publicar un comentario