Giter Site home page Giter Site logo

c_janken's Introduction

c_janken

概要

2021年のプロⅢの前期中間試験の過去問

問題

ユーザのコマンドラインでの入力でジャンケンの手を0から2で受け取り、乱数で作成したコンピュータのジャンケンの手との勝敗を表示する。あいこの場合は入力からやり直す。また、不正な入力値の場合は再度入力を要求する。

$ cc [ファイル名].c && ./a.out
手を選んでください[0...グー/1...チョキ/2...パー]: 1
あなたはチョキを選びました。
コンピュータはチョキでした。
手を選んでください[0...グー/1...チョキ/2...パー]: 2
あなたはパーを選びました。
コンピュータはグーでした。
あなたの勝ちです。
$
$ cc [ファイル名].c && ./a.out
手を選んでください[0...グー/1...チョキ/2...パー]: 2
あなたはパーを選びました。
コンピュータはチョキでした。
コンピュータの勝ちです。

c_janken's People

Contributors

lemo-nade-room avatar nitnctanakashoki avatar

Watchers

 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.