用 double 换就行了
#include <stdio.h>
int main()
{
double v1,v2;
printf("*****************************************\n");
printf("* *\n");
printf("* please input ______ km *\n");
printf("* is equal to ______ m *\n");
printf("* *\n");
printf("* *\n");
printf("*****************************************\n");
scanf("%lf",&v1); v2 = 1000*v1;
// clrscr();
printf("*****************************************\n");
printf("* 1 Length conversion *\n");
printf("* 2 Area conversion *\n");
printf("* 3 Pressure conversion *\n");
printf("* %lf km = %lf m *\n", v1,v2 );
printf("*****************************************\n");
}
#include <stdio.h>
int main()
{
double v1,v2;
printf("*****************************************\n");
printf("* *\n");
printf("* please input ______ km *\n");
printf("* is equal to ______ m *\n");
printf("* *\n");
printf("* *\n");
printf("*****************************************\n");
scanf("%lf",&v1); v2 = 1000*v1;
// clrscr();
printf("*****************************************\n");
printf("* 1 Length conversion *\n");
printf("* 2 Area conversion *\n");
printf("* 3 Pressure conversion *\n");
printf("* %lf km = %lf m *\n", v1,v2 );
printf("*****************************************\n");
}