“como obter tempo e data em c” Respostas de código

c tem tempo

/* localtime example */
#include <stdio.h>
#include <time.h>

int main ()
{
  time_t rawtime;
  struct tm * timeinfo;

  time ( &rawtime );
  timeinfo = localtime ( &rawtime );
  printf ( "Current local time and date: %s", asctime (timeinfo) );
  
  return 0;
}
JulesG10

como obter tempo e data em c

#include <stdio.h>
#include <time.h>

int main()
{
  time_t t = time(NULL);
  struct tm tm = *localtime(&t);
  printf("now: %d-%02d-%02d %02d:%02d:%02d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
}
Inquisitive Iguana

Respostas semelhantes a “como obter tempo e data em c”

Perguntas semelhantes a “como obter tempo e data em c”

Mais respostas relacionadas para “como obter tempo e data em c” em C

Procure respostas de código populares por idioma

Procurar outros idiomas de código