Wednesday, January 20, 2016

URI Solution of 1019 - Time Conversion

//URI 1019
//Author: Humaun Kabir

#include <stdio.h>
int main(){
    int n, h, m, s;
    scanf("%d",&n);
    h = n / 3600;
    m = n % 3600 / 60;
    s = n % 60;
    printf("%d:%d:%d\n",h, m, s);
    return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)