
Problemas Con Un Programa
Publicado por anonymous (2 intervenciones) el 14/11/2019 22:08:03
es que la verdad no se que hacer y en estos momentos ando re mal
https://ibb.co/84wRQ85
https://ibb.co/cL5gHb2
aqui te doy 2 link de 2 fotos explicando que debo hacer en el programa
https://ibb.co/84wRQ85
https://ibb.co/cL5gHb2
aqui te doy 2 link de 2 fotos explicando que debo hacer en el programa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#include <iostream>
#include <string>
using namespace std;
const int sz = 2;
struct Producto{
string nombre;
int codigo;
float precio;
int cantidad;
};
void menu();
void gtienda();
void tienda();
void introducirDatos( Producto p[] );
void imprimirDatos( Producto p[] );
int main(){
Producto p[sz];
char opcion,x,z;
system("cls");
system("color 0A");
do{
menu();
cin>>opcion;
switch(opcion){
case 1:{
gtienda();
cin>>x;
switch(x){
case 1:{
introducirDatos( p );
break;
}
case 2:{
return 0;
break;
}
case 3:{
imprimirDatos( p );
break;
}
}
break;
}
case 2:{
do{
tienda();
cin>>z;
switch(x){
}
}while(z>0 && z<7);
break;
}
}
}while( opcion != '3' );
}
void menu(){
cout << "\n MENU"
<< "\n========================"
<< "\n1.- Gestion Tienda ... [1]"
<< "\n2.- Tienda ........... [2]"
<< "\n3.- Salir ............ [3]"
<< "\n========================"
<< "\nOPCION (1-3): ";
}
void gtienda(){
cout << "\n Gestion De Tienda"
<< "\n========================"
<< "\n1.- Crear Producto ... [1]"
<< "\n2.- Modificar Producto [2]"
<< "\n3.- Lista De Productos [3]"
<< "\n========================"
<< "\nOPCION (1-3): ";
}
void tienda(){
cout << "\n Tienda"
<< "\n========================"
<< "\n1.- Venta De Productos .................. [1]"
<< "\n2.- Compras De Productos ................ [2]"
<< "\n3.- Valor De Productos De La Tienda ..... [3]"
<< "\n3.- Producto Mas Costoso En La Tienda ... [3]"
<< "\n3.- Producto Mas Economico De La Tienda . [3]"
<< "\n3.- Lista De Producto Con Baja Existencia [3]"
<< "\n========================"
<< "\nOPCION (1-7): ";
}
void introducirDatos( Producto p[] ) {
for( int i = 0; i < sz; i++ ) {
cout << "\nProducto " << i + 1 << ":\n";
cout << "Nombre: ";
cin.ignore();
getline( cin, p[i].nombre );
cout << "Codigo: ";
cin >> p[i].codigo;
cout << "Precio: ";
cin >> p[i].precio;
cout << "Cantidad: ";
cin >> p[i].cantidad;
}
}
void imprimirDatos( Producto p[] ){
for( int i = 0; i < sz; i++ ) {
cout << "\nProducto " << i + 1 << ": "
<< "\nNombre: " << p[i].nombre
<< "\nCodigo: " << p[i].codigo
<< "\nPrecio: " << p[i].precio
<< "\nCantidad: " << p[i].cantidad
<< endl;
}
}
Valora esta pregunta


0