Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Thursday, 10 November 2016

URI-1019

URI Online Judge | 1019

Time Conversion

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Problem link Click here
Read an integer value, which is the duration in seconds of a certain event in a factory, and inform it expressed in hours:minutes:seconds.

Input

The input file contains an integer N.

Output

Print the read time in the input file (seconds) converted in hours:minutes:seconds like the following example.
Input SampleOutput Sample
5560:9:16
10:0:1
14015338:55:53

Solution....

#include<stdio.h>
int main()
{
    int a,b,c,n;
    scanf("%d",&n);
    a=n/3600;
    n=n%3600;
    b=n/60;
    c=n%60;
    printf("%d:%d:%d\n",a,b,c);

    return 0;
}



No comments:

Post a Comment