Advertisement
snt2523

Lây thời gian hiện tại

Nov 1st, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <stdio.h> // Cách lấy thời gian hiện tại
  2. #include <time.h>
  3.  
  4. void main()
  5. {
  6.  
  7.     time_t ht = time(0);
  8.     tm * tg = localtime(&ht);
  9.     printf("Nam hien tai la %d", tg->tm_year);
  10.  
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement