All pastes #81641 Raw Edit

Untitled

public cpp v1 · immutable
·published 2006-07-07 18:37 UTC
rendered paste body
#include <sstream>#include <iostream>#include <string>class Time {	public:	string whatTime (int seconds) {		int hourrem;		int minrem;		hourrem = seconds%3600;		int hours = (seconds-hourrem)/3600;		minrem = hourrem%60;		int mins = (hourrem-minrem)/60;		int sec = minrem;		stringstream sshours;		sshours << hours;		stringstream ssmins;		ssmins << mins;		stringstream sssec;		sssec << sec;		string thetime = sshours.str() + ":" + ssmins.str() + ":" + sssec.str();		return thetime;	}}