Saturday, 23 June 2012

how to convert miles into kilometer using c++



This is the source code to convert miles into kilometer
#include<iostream.h>
#include<conio.h>
main()
{
      float miles,km;
      cout<<"enter the value in miles:";
      cin>>miles;
      km=miles*1.609;
      cout<<miles<<"miles="<<km<<"kilometer";
      getch();
      }
End

No comments:

Post a Comment