C++ Language | Time Converter

Sunday 26 May 2013

TIME is GOLD. This is the most famous saying when it comes to valuing time management. We know that every second/s of the day is important because we know that we can do a lot of things already in such time. One of the most useful job a time can do is allowing us to manage our day, our priorities and our lives. Time is composed of two main parts: minutes and seconds.

Usually, seconds time is used in sports especially running. There are runners who time check their selves to check how long had they run in 60 seconds and more. This is used by seconds timers either digital or analog. Now, I made a program that converts seconds to days, minutes and seconds. This program is used with long data type identifier because we need to convert large numbers. Check out the sample codes below.

#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
    long seconds,days,mins,sec;
 
    cout<<"Enter the number of seconds: ";
    cin>>seconds;
Related Posts Plugin for WordPress, Blogger...