Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int nTime = 1690116355; // 15:45:55 23 July 2023 Воскресенье
- // Sunday, 23 Jul 2023 12:45:55 GMT
- int get_sec (int n);
- int get_min (int n);
- int get_hour(int n);
- // Вернёт день недели: 1 = если понедельник
- // 2 = вторник
- // 3 = среда
- // 4 = четверг
- // 5 = пятница
- // 6 = суббота
- // 7 = воскресенье
- int get_day_w(int n);
- ////////////////////////////////////////////////////
- int main() //
- {
- int nRes = get_min (nTime); printf("get_min = %d\n", nRes);
- nRes = get_sec (nTime); printf("get_sec = %d\n", nRes);
- nRes = get_hour (nTime); printf("get_hour = %d\n", nRes);
- nRes = get_day_w(nTime); printf("day of the week = %d\n", nRes);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement