Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. 16/1/119 23:55:0
  2. 16/1/119 23:55:0
  3.  
  4. 16/1/119 23:60:0
  5. 16/1/119 23:0:0
  6.  
  7. 16/1/119 23:5:0
  8. 16/1/119 23:5:0
  9.  
  10. 16/1/119 23:10:0
  11. 16/1/119 23:10:0
  12.  
  13. 16/1/119 23:15:0
  14. 16/1/119 23:15:0
  15.  
  16. #include <stdio.h>
  17. #include <time.h>
  18.  
  19. int main()
  20. {
  21. struct tm dt_stream;
  22. int i;
  23.  
  24. dt_stream.tm_mday = 16;
  25. dt_stream.tm_mon = 1; //02 Fev;
  26. dt_stream.tm_year = 19 + 2000 - 1900; //2019
  27. dt_stream.tm_hour = 23;
  28. dt_stream.tm_min = 50;
  29. dt_stream.tm_sec = 0;
  30.  
  31.  
  32. for ( i=0; i<5; i++) {
  33. dt_stream.tm_min = dt_stream.tm_min + 5;
  34.  
  35. printf("%d/%d/%d %d:%d:%dn", dt_stream.tm_mday, dt_stream.tm_mon, dt_stream.tm_year,
  36. dt_stream.tm_hour,dt_stream.tm_min, dt_stream.tm_sec);
  37.  
  38.  
  39. mktime(&dt_stream);
  40.  
  41. printf("%d/%d/%d %d:%d:%dn", dt_stream.tm_mday, dt_stream.tm_mon, dt_stream.tm_year,
  42. dt_stream.tm_hour,dt_stream.tm_min, dt_stream.tm_sec);
  43.  
  44. printf("*****n");
  45. }
  46.  
  47. return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement