Printf "%.0d\n", 0

e$B0J2<$N$h$&$K!"e(Bprintf e$B$Ge(B %.0d e$B$Ke(B 0 e$B$rM?$($k$H!"e(B0
e$B$H$J$j$^$9!#e(B

% ./ruby -ve ‘printf “%.0d\n”, 0’
ruby 1.9.0 (2008-01-24 revision 0) [i686-linux]
0

e$B$3$l$Oe(B C e$B$N5,3J$de(B glibc
e$B$K$h$k<BAu$G$O6uJ8;zNs$K$J$j$^$9!#e(B

% cat t.c
#include <stdio.h>

int main(int argc, char **argv)
{
printf("%.0d\n", 0);
return 0;
}
% gcc -Wall t.c
% ./a.out

e$B$^$?!"e(Bperl e$B$de(B python e$B$G$b6uJ8;zNs$K$J$j$^$9!#e(B

% perl -e ‘printf “%.0d\n”, 0’

% python -c ‘print “%.0d” % 0’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs