uri online judge problem 1015 solution c programming

UIR online judge problem 1015 solution c             programming


code : 

#include<stdio.h>
int main()
{
    int N,minutes,h,second,hours;
    scanf("%d",&N);
    h=N/60;
    second=N%60;
    if(h>=60){
        hours=h/60;
        minutes=h%60;
      printf("%d:%d:%d\n",hours,minutes,second);
    }
    else
        printf("0:%d:%d\n",h,second);

    return 0;
}


output : 




No comments

Powered by Blogger.