Электронные часы

mail@pastecode.io avatar
unknown
c_cpp
a year ago
275 B
3
Indexable
Never
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    int h = n / 3600 % 24;
    n = n % 3600;
    int m = n / 60;
    n = n % 60;
    int s = n;
    cout << h << ":" << m / 10 << m % 10 << ":" << s / 10 << s % 10;
    return 0;
}