Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ hours minutes seconds

int seconds, hours, minutes;
cin >> seconds;
minutes = seconds / 60;
hours = minutes / 60;
cout << seconds << " seconds is equivalent to " << int(hours) << " hours " << int(minutes%60) 
     << " minutes " << int(seconds%60) << " seconds.";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #hours #minutes #seconds
ADD COMMENT
Topic
Name
8+7 =