Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C(gcc) Local Time and math.h Example
#include <stdio.h> #include <math.h> #include <time.h> /* Local Time Example By Ice Scripter Note to self: Add "-lm" at the end of Comp Args if you're using the math.h lib */ int main() { int osTime = time(0); // Keeping a consistant time // printf("hr;mi;se\n\n"); printf("%d:%d:%d\n", (int)ceil(osTime/60/60)%24, // Converting to int (int)ceil(osTime/60) %60, // " " osTime %60 // No need for ceil // ); }
run
|
edit
|
history
|
help
1
Print Bash Version.c
1/23/2017
PREGUNTA 2, GUÍA 4, MÓDULO 3 FINALIZADA
Midterm practice, turn into for loop
Area of a rectangular prism
Ultimo avance de pregunta 1 guía4
Strncpy memcpy
bitwise operations
Coba
ordenarcifrademenosamas