Memperoleh Waktu Lokal Dengan C
Welcome in this blog. Now I’m going to share with you how to get kocal time. To get it we should use functioni "ctime", we just call that function form "berkas judul (header file)" <time.h>
/*
Program C untuk memperoleh
informasi waktu lokal
*/
#include <stdio.h>
#include <conio.h>
#include <time.h>
main()
{
time_t ambil_waktu;
time(&ambil_waktu);
printf("Waktu Lokal Daerah Medan : \n %s ", ctime (&ambil_waktu));
getch();
return 0;
}
|
Tidak ada komentar:
Posting Komentar