main.cpp
By: Jazy | Date: Oct 2 2007 05:14 | Format: C++ | Expires: never | Size: 745 B | Hits: 1294
- #include <iostream>
- #include <string>
- #include "clockType.h"
- using namespace std;
- int main()
- {
- int hours;
- int minutes;
- int sec;
- string z;
- char zone[2];
- extClockType tmp,tmp2;
- cout<<"Please Enter a time...n";
- cout<<"Hour: ";
- cin>>hours;
- cout<<"Minutes: ";
- cin>>minutes;
- cout<<"Seconds: ";
- cin>>sec;
- cout<<"Please enter TimeZone: ";
- cin>>z;
- zone[0] = z[0];
- zone[1] = z[1];
- tmp.setTime(hours,minutes,sec);
- tmp.setZone(zone);
- cout<<tmp;
- tmp2.setTime(12,12,12);
- tmp2.setZone(zone);
- tmp + tmp2;
- if (tmp == tmp2)
- cout<<"They are equaln";
- else
- cout<<"They aren't equaln";
- return 0;
- }
Latest pastes
1 hours ago
1 days ago
1 days ago
2 days ago
2 days ago