Ubuntu下格式化输出第一个%d
#include<stdio.h>int main(int argc,char **argv)
{
int n,factorial=1;
printf("please input an interger >= 0\n");
scanf("%d",&n);
while(n>0)
{
factorial*=n;
n--;
}
printf("factorial of %d is :%d\n",n,factorial);
return 0;
}
/*printf输出时第一个%d显示的是0.Ubuntu 13.04环境下。怎么回事啊?*/