#include <iostream>
using namespace std;
int hp = 20;
int main()
{
int hp = 100;
int damage = 50;
hp -= damage;
bool isDead = (hp <= 0);
if (isDead)
cout << "몬스터가 죽었다" << endl;
else if(hp<=20)
cout << "몬스터가 도망감" << endl;
else
{
cout << "몬스터가 반격했다" << endl;
}
const int ROCK = 0;
const int PAPER = 1;
const int SCISSORS = 2;
int input = ROCK;
if (input == ROCK)
cout << "바위" << endl;
else if (input == PAPER)
cout << "보" << endl;
else if (input == SCISSORS)
cout << "가위" << endl;
else
cout << "잘못냄" << endl;
switch (input) {
case ROCK:
cout << "바위" << endl;
break;
case PAPER:
cout << "보" << endl;
break;
case SCISSORS:
cout << "가위" << endl;
break;
default:
cout << "잘못냄" << endl;
break;
}
}