ahmed0saber

Show date and time in C++

Nov 4th, 2020
2,287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main()
  6. {
  7.     time_t my_time = time(NULL);
  8.     printf("%s", ctime(&my_time));
  9.     return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment