Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This code sample was written to show what my device in minecraft is doing at a basic level,
- This is a lot faster than the one that I made but, It is a fair representation of how it works.
- Code example and map by 1mb_ram on Planetminecraft. I was too lazy to port code to linux or mac : )
- */
- #include <iostream>
- using namespace std;
- int main() {
- int s,m,h;
- s = 9999; // seconds
- m = 0; // minutes
- h = 0; // hours
- while (s > 60) {
- s = s - 60;
- m++;
- }
- while (m > 60) {
- m = m - 60;
- h++;
- }
- std::cout << s << " Second(s), " << m << " Minutes(s), " << "and " << h << " Hour(s)";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement