English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a distance, and I want to convert the travel time to hours and minutes... With a constant speed of 55 MPH

2006-11-07 12:09:37 · 2 answers · asked by Angelo L 1 in Computers & Internet Programming & Design

2 answers

//D = dictance value assume alrady exist

int H,min,TM; //TM =total Minutes
int speed =55;

TM=Math.Round((D*60)/speed);

H=TM/60;
min=TM%60;

label1.text= H.toString() + " hours and " + min.ToString() + " Minutes";

2006-11-07 12:35:03 · answer #1 · answered by safrodin 3 · 0 0

Need a bit more info

1.1 or 2.0?

2006-11-07 12:13:31 · answer #2 · answered by Chris 2 · 0 0

fedest.com, questions and answers