Fractions to Decimals

时间:2013-05-31 15:09:59
【文件属性】:

文件名称:Fractions to Decimals

文件大小:99KB

文件格式:RAR

更新时间:2013-05-31 15:09:59

c c++ 编程语言 厦门大学acm在线系统试题

Write a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the decimal representation. If the decimal representation has a repeating sequence of digits, indicate the sequence by enclosing it in brackets. For example, 1/3 = .33333333...is denoted as 0.(3), and 41/333 = 0.123123123...is denoted as 0.(123). Use xxx.0 to denote an integer. Typical conversions are: 1/3 = 0.(3) 22/5 = 4.4 1/7 = 0.(142857) 2/2 = 1.0 3/8 = 0.375 45/56 = 0.803(571428)


【文件预览】:
1011
----Debug()
--------vc60.pdb(44KB)
--------1011.pdb(433KB)
--------1011.exe(184KB)
--------1011.obj(4KB)
----1011.plg(1KB)
----1011.opt(48KB)
----1011.dsw(516B)
----1011.ncb(33KB)
----1011.dsp(4KB)
----1011.cpp(1KB)

网友评论