~cpp
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
int num;
int strike=0;
int ball=0;
int rmatch[3];
do
{
srand((time(0)));
rmatch[0] = rand() % 10;
srand((time(0)));
rmatch[1] = rand() % 10;
rmatch[2] = rand() % 10;}
while(rmatch[0]==rmatch[1] || rmatch[1]==rmatch[2] || rmatch[0]==rmatch[2]);
cout << rmatch[0]<< rmatch[1]<< rmatch[2];
cout<<"야구게임ì�„ í•´ 봅시닷! 수를 ìž…ë ¥í•˜ì„¸ìš”. 단 세ìž�리여야 합니다.\n" ;
cin >> num;
int match[3];
match[0]=num/100;
match[1]=(num%100)/10;
match[2]=num%10;
int check=0;
if(num>100 && num<999)
{
for(int i=0;i<3&& check==0;i++)
{
for(int j=0;j<3 && check==0;j++)
{
if(i==j && match[i]==rmatch[j])
strike++;
else if(i!=j && match[i]==rmatch[j])
ball++;
}
}
if(strike==0 && ball==0)
cout<<"out...\n";
else
{cout<< endl <<strike << ":스트���\n";
cout<< ball << ":ë³¼\n";}
}
else
cout<<"다시 ìž…ë ¥í•˜ì…”ì•¼ ê² ë„¤ìš”~\n";
return 0;
}
ì•„ì•„ì•…~ ì�´ê±°ì—시 ì–´ë µìŠµë‹ˆë‹¤ì•„~ ã…œ_ã…œ 한참 ê³ ìƒ�해서 ë�„ì›€ë°›ê³ ...ì—�ì�´êµ¬ìš°~