Create a method called “MilesToKilometers” • Name: MilesToKilometers • Parameter: o A double representing the miles distance o A double representing the kilometers distance - this should be an "out" parameter • Returns: Nothing • Displays: Nothing • Task: Calculates the conversion from miles to kilometers. The converted kilometer is returned as an "out" parameter
private void MilesToKilometers(double miles, out double kilometers)
{
kilometers = miles * 1.60934;
}
Comments
Leave a comment