
Ayuda, condicionales switch
Publicado por Thomas (6 intervenciones) el 29/09/2021 04:25:48
Buena noche me gustaria recibir ayuda en una tarea que tengo ya que llevo tiempo intentando solucionar
el codigo es el siguiente y es un uso de switch para determinar varias variables
#include <iostream>
using namespace std;
int main()
{
string shoe_type;
int shoe_price;
cout << "DIGITE EL COSTE DEL ZAPATO: " << endl << endl;
cin >> shoe_price;
switch (shoe_price)
{
case shoe_price < 30000: cout << "Tipo A"; break;
}
system("pause");
return EXIT_SUCCESS;
}

el codigo es el siguiente y es un uso de switch para determinar varias variables
#include <iostream>
using namespace std;
int main()
{
string shoe_type;
int shoe_price;
cout << "DIGITE EL COSTE DEL ZAPATO: " << endl << endl;
cin >> shoe_price;
switch (shoe_price)
{
case shoe_price < 30000: cout << "Tipo A"; break;
}
system("pause");
return EXIT_SUCCESS;
}

Valora esta pregunta


0