int totsecs(int hours, int minutes, int seconds) { int total; total = ((hours * 60) + minutes) * 60 + seconds; return total; }
int tot = totsecs(2,15,32); cout << "Total seconds: " << tot << endl;
int totsecs(int hours, int minutes) { int total; total = ((hours * 60) + minutes) * 60; return total; }
int tot = totsecs(3,22); cout << "Total seconds: " << tot << endl;
int totsecs(int, int=0, int=0); int totsecs(int hours, int minutes, int seconds) { int total; total = ((hours * 60) + minutes) * 60 + seconds; return total; }
int tot = totsecs(4); int tot = totsecs(4,37); int tot = totsecs(4,37,44);
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2002