作者在 2011-07-02 13:18:44 发布以下内容
/*
*英里转换成公里
*/
#include<stdio.h>
#include<conio.h>
#define KMS_PER_MILE 1.609
*英里转换成公里
*/
#include<stdio.h>
#include<conio.h>
#define KMS_PER_MILE 1.609
int main()
{
double miles,
kms;
printf("enter the distance in miles >");
scanf("1f%",&miles);
kms = KMS_PER_MILE * miles ;
printf("that is equals %f kilometers.\n",kms);
return(0);
}
这个编程那里错发了,运行结果一闪而过,加了两个getchar()也没用.
{
double miles,
kms;
printf("enter the distance in miles >");
scanf("1f%",&miles);
kms = KMS_PER_MILE * miles ;
printf("that is equals %f kilometers.\n",kms);
return(0);
}
这个编程那里错发了,运行结果一闪而过,加了两个getchar()也没用.