Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想四舍五入到小数点后半。
因此,如果我有 1.45,它会四舍五入为 1。如果我有 1.55,它会四舍五入为 1.5。那有意义吗?
Math.floor(x*2)/2
这应该做。
我试过这个例子:
#!C:/Perl64/bin/perl.exe $mickey = "Hi i'm Mickey"; $pluto = "Hi i'm Pluto"; print <<EOF; $pluto Hi i'm Goofy $mickey EOF print &