GithubHelp home page GithubHelp logo

20201015-homework-basic's Introduction

20201015 作業:錢包問題(cash.cpp)

最少有多少個銅板+紙鈔可以湊到給定金額?

  • 幣值:1000, 500, 100, 50, 10, 5, 1, 0.5, 0.1
  • 金額有可能大於四位數
  • 金額有可能有小數

測試範例 1

金額:1666.6
9

測試範例 2

金額:248.6
12

作業注意事項

  • 含有小數點的金額可能會有誤,你需要先將金額轉換成整數處理。
  • 請使用 Do-While 確認使用者輸入正確金額
  • 請注意浮點數的不準確性,你應該要將使用者輸入的金額都轉換成以「角」(0.1 元)為單位,意即把 float 轉為 int,以避免相加的錯誤。
  • 當然,不要只是將使用者的輸入從 float 轉換為 int!一角等於多少元?

Pull Request 前請確認以下事項:

  • 已閱讀 作業繳交方式
  • 在下方附上 Repl 連結
  • 檔案放在自己學號的目錄下
  • 標題以「班級座號、學號、姓名」作為開頭
  • 其他說明事項可以在下面補充

20201015-homework-basic's People

Watchers

 avatar  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.