Ayuda con este codigo no sale nada despues de la opcion 1
Publicado por Randy Valentin (1 intervención) el 04/12/2013 15:10:32
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
117
118
119
120
121
122
123
124
125
126
127
128
129
#include <iostream>
#include<conio.h>
#include<stdio.h>
#include<string.h>
using namespace std;
int main(){
while (true){
int option = 0;
int i = 0;
int j = 0;
float pumkimps[1][19];
float price = .85;
float total = 0;
float smallest = 10000000000000000;
float biggest = 0;
int dimencion = 0;
float average = 0;
cout << "Pumkimp Patch " << endl;
cout << "Welcome, enter the quantity of pumkings to work with: ";
cin >> dimencion;
cout << "option" << endl;
cout << "1.Add" << endl;
cout << "2.Average" << endl;
cout << "3.Inventoy Cost" << endl;
cout << "4.Biggest" << endl;
cout << "5.Smallest" << endl;
cout << "Su opcion es: ";
cin >> option;
while (option >= 1 && option <= 5)
{
while (option == 1)
{
while (j < 1)
{
while (i < dimencion)
{
cout << "Entre el peso de la calabaza en la posicion: " << j << "," << i << endl;
cin >> pumkimps[j][i];
i++;
}
j++;
}
cout << "Entre otra opcion del menu: ";
cin >> option;
}
while (option == 2)
{
while (j < 1)
{
while (i < dimencion)
{
total = (total + pumkimps[j][i]);
i++;
}
j++;
}
average = (total / dimencion);
cout << "El average de esta cosecha es: " << average << endl;
cout << "Entre otra opcion del menu:";
cin >> option;
}
while (option == 3)
{
while (j < 1)
{
while (i < dimencion)
{
total = (total + pumkimps[j][i]);
i++;
}
j++;
}
total = (total * price);
cout << "El costo del inventario es: " << total << endl;
cout << "Entre otra opcion del menu: ";
cin >> option;
}
while (option == 4)
{
while (j < 1)
{
while (i < dimencion)
{
if (pumkimps[j][i] < smallest)
smallest = pumkimps[j][i];
i++;
}
j++;
}
cout << "La calabaza mas pequena pesa: " << smallest << endl;
cout << "Entre otra opcion del menu: ";
cin >> option;
}
while (option == 5)
{
while (j < 1)
{
while (i < dimencion)
{
if (pumkimps[j][i] > biggest)
biggest = pumkimps[j][i];
i++;
}
j++;
}
cout << "La calabaza mas grande pesa: " << biggest << endl;
cout << "Entre otra opcion del menu: ";
cin >> option;
}
}
cout << "Invalid Command" << endl;
system("pause");
system("cls");
}
system("pause");
return 0;
}
Valora esta pregunta
0