菜鸟问题:搞不懂,谢谢解释下
我想请问下为什么要加L,我不加L,它显示的就是 一公斤=0.000000英镑#include<stdio.h>
#include<stdlib.h>
void kgtopound(double);
int main()
{
double kg;
extern double pound;
printf("公斤转英镑\n");
printf("一公斤=%f英镑\n",pound);
printf("请输入公斤数:");
scanf("%lf",&kg);/*这里为什么要加L*/
kgtopound(kg);
system("pause");
return 0;}
double pound=2.204634;
void kgtopound(double kg)
{
printf("%.1lf公斤=%.3f英镑\n",kg,pound*kg);/*这里也加了L*/
}