#include <iostream>
using namespace std;
class GuessGame{
public:
int target;
GuessGame(){
srand(time(0));
target = rand() % 100 + 1;
}
void play(){
int gusse;
cin >> gusse;
if (gusse > target) {
cout <<"너무 큽니다"<<endl;
}
if (gusse < target) {
cout <<"너무 작습니다"<<endl;
}
if (gusse == target) {
cout <<"정답!"<<endl;
}
}
};
int main() {
GuessGame game;
game.play();
}
To embed this project on your website, copy the following code and paste it into your website's HTML: