//////////////////////////////////////////////////////
// This programs prints time and date on the screen //
// Roger Hartley, Spring 2000, CS 177/477           //
//////////////////////////////////////////////////////

#include <iostream>
#include <string>
#include <sys/time.h>

int main() {
    time_t clock = time(0);
    tm *clockStruct = localtime(&clock);
    const int length = 10;
    char temp[10];

    strftime(temp, length, "%D", clockStruct);
    string date(temp);
    strftime(temp, length, "%R %p", clockStruct);
    string time(temp);

    cout << "I finished this at " << time << " on " << date << endl;
}

