Friday, October 1, 2010

C source code to Convert miles to kilometers and print with proper sentence for the user. (1 mile = 1.609 km)

C source code to Convert miles to kilometers 

int main()
{
float k,m;
printf("Enter miles");
scanf("%f",&m);
k=m*1.602;
printf("%f miles=%f kilometers",m,k);
getch();
return 0;
}

No comments:

Post a Comment

Google+ Followers