Advertisement
Guest User

Code C Version

a guest
Jan 25th, 2021
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  6.  
  7. int main(int argc, char *argv[]) {
  8.  
  9. time_t hora;
  10. time(&hora);
  11.  
  12. struct tm*tempo = localtime(&hora);
  13.  
  14.  
  15. printf("Hello \n");
  16.  
  17. printf("%d:", tempo->tm_hour);
  18. printf("%d:", tempo->tm_min);
  19. printf("%d\n", tempo->tm_sec);
  20.  
  21.  
  22. int i;
  23. int l=0;
  24.  
  25. for(i=0;i<2000000000;l++){
  26.  
  27. if(i==l){
  28.  
  29. }
  30. if(l==10){
  31. i++;
  32. l=0;
  33. }
  34. }
  35.  
  36.  
  37. time_t hora2;
  38. time(&hora2);
  39.  
  40. struct tm*tempo2 = localtime(&hora2);
  41.  
  42.  
  43. printf("%d:", tempo2->tm_hour);
  44. printf("%d:", tempo2->tm_min);
  45. printf("%d\n", tempo2->tm_sec);
  46.  
  47.  
  48. return 0;
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement