// Prueba enupal.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include "conio.h"
#include <string>
using namespace std;
int main()
{
int vidas;
cout << " HOLA ";
cin >> vidas;
if (vidas == 3)
{
cout << "Felicitaciones TROFEO DE ORO";
}
else if (vidas == 2)
{
cout << "TROFEO DE PLATA";
}
else
{
cout << "Felicitaciones TROFEO DE Bronce";
}
//Ejemplo del switch
cout << endl << "*********EJEMPLO CON SWITCH" << endl;
switch (vidas)
{
case 3:
cout << "Felicitaciones TROFEO DE ORO";
break;
case 2:
cout << "Felicitaciones TROFEO DE Plata";
break;
default:
cout << "Felicitaciones TROFEO DE Bronce";
break;
}
string nivel = "facil";
int vidasFinal = (nivel == "dificil") ? 2 : 4 ;
cout << endl << "Nro de vidas: " << vidasFinal;
_getch();
return 0;
}