'strike'3回で'out',
「strike」が3回入力されたら、というのをカウントする必要がありますね。
'ball'4回で'fourball'
上と同じく「ball」が4回入力されたら、というのをカウントする必要がありますね。
追記
ちなjavascriptならこんな感じ。
javascript
1((s=0,b=0)=>{
2 while(s < 3 && b < 4){
3 let j = window.prompt('input your judgement');
4 if(j=='strike'){ console.log('strike ' + ++s); }
5 if(j=='ball'){ console.log('ball ' + ++b); }
6 }
7 if(s>=3){console.log('out!');}
8 if(b>=4){console.log('four ball!');}
9})()
10
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/16 06:46