标签:style blog color io ar sp div c log
1 #include <stdio.h> 2 3 int square137(int n); 4 5 void p137() { 6 double x = 3.0; 7 int y = (int)x; 8 printf("Square of %f is %d\n", x, square137(y)); 9 } 10 11 int square137(int n) { 12 return n * n; 13 }
如果你吧%f改为%lf的话,输出就会出乎你的意料,试试便知
标签:style blog color io ar sp div c log
原文地址:http://www.cnblogs.com/qrlozte/p/4010290.html