// asks the user to enter time and then prints it in two formats // lifted from Deitel&Deitel p.368 // Mikhail Nesterenko // 10/17/99 #include #include "time.h" int main(){ // would this initialization work? // Time usertime; // asks the user to enter hours, minutes and seconds int hours, minutes, seconds; cout << "Enter hours: "; cin >> hours; cout << "Enter minutes: "; cin >> minutes; cout << "Enter seconds: "; cin >> seconds; Time usertime(hours, minutes, seconds); cout << "You entered: "; usertime.printMilitary(); // prints in military format cout << " military time, \nwhich is "; usertime.printStandard(); // prints in standard cout << " standard time.\n"; }