Solution:NIIT/GNIIT Sonugiri0032@gmail.com

Wednesday, January 06, 2016

Current Date and Time C++

Current Date and Time C++


Structure of the Problem Requirements 

C++ has a class for current date and time .The Ctime class give the current time and date (as set in the system ). After that convert that time arguments in string and simple print them .

Source Code

#include <iostream>
#include <ctime>
using namespace std;

int main( )
{
   time_t now = time(0);
   char* dt = ctime(&now);
   cout << " The LEP Developers uplaod this Program On \n \n  " << dt << endl;
}

Output of the Program

Current Date and Time C++
Share:

0 comments:

GNIITSOLUTION GNIIT SOLUTION. Powered by Blogger.

Translate

Blog Archive

Unordered List