Giter Site home page Giter Site logo

baseball's Introduction

baseball

1. baseball game generates 3 digit random number (no repeating digits).

2. Then the user has to guess the three 3 digit number.

If the guessed digit is in the same order as the one in the generated number, output:

"{count of digits correct with index correct}S"

If the guessed digit is in the generated number but is not in the same order, output:

"{count of digits correct but index different}B"

If the above cases are mixed, output:

"{count of digits correct but index different}B{count of digits correct with index correct}S"

Example:

컴퓨터가 숫자를 생성하였습니다. 답을 맞춰보세요! 304
1번째 시도 : 301
0B2S
310
2번째 시도 : 310
1B1S
403
3번째 시도 : 403
2B1S
304
4번째 시도 : 304
3S
4번만에 맞히셨습니다.
게임을 종료합니다.

baseball's People

Contributors

dh7hong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.