Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct date
- {
- int day = 27;
- string month = "September";
- int year = 2020;
- int day_max = 31;
- };
- struct times
- {
- int hour = 11;
- int minutes = 15;
- int seconds = 25;
- int hour_max = 24;
- int minutes_max = 59;
- int seconds_max = 59;
- };
- void show()
- {
- date d;
- times t;
- if (d.day <= d.day_max)
- {
- cout << d.day << " " << d.month << " " << d.year << endl;
- }
- else
- {
- cout << "Well... Something gone wrong" << endl;
- }
- if (t.hour <= t.hour_max, t.minutes <= t.minutes_max, t.seconds <= t.seconds_max)
- {
- cout << t.hour << ":" << t.minutes << ":" << t.seconds << endl;
- }
- else
- {
- cout << "Well... Something gone wrong" << endl;
- }
- }
- int main()
- {
- setlocale(LC_ALL, "rus");
- show();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement