Coder Social home page Coder Social logo

fraction's Introduction

Fraction

第三次测试:分数处理工具 设计一个表示分数的类Fraction。这个类用两个int类型的变量分别表示分子和分母。

1.分数转小数 2.两个分数之间的四则运算,将自己以“分子/分母”的形式输出到标准输出,并带有回车换行。如果分数是1/1,应该输出1。当分子大于分母时,不需要提出整数部分,即31/30是一个正确的输出。

注意,在创建和做完运算后应该化简分数为最简形式。如2/4应该被化简为1/2。

备注:去年编程大赛的比赛要求,供大家参考(1.功能完整 2.代码整洁 3.测试保障 4.小步提交)

Git注意事项: 标识及说明(标识选填):

build 影响构建系统或外部依赖关系的更改 (实例范围:pom,npm) ci 更改我们的持续集成文件和脚本(示例范围:Jenkins) docs 仅文档更改 feat 一个新功能 fix 修复错误 perf 改进性能的代码更改 refactor 代码更改,既不修复错误也不添加功能 style 不影响代码含义的变化(空白,格式化,缺少分号等) test 添加缺失测试或更正现有测试

fraction's People

Contributors

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