forked from ASD-ADF/ASD_Task_2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClock.h
More file actions
35 lines (27 loc) · 636 Bytes
/
Clock.h
File metadata and controls
35 lines (27 loc) · 636 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef CLOCK_H_INCLUDED
#define CLOCK_H_INCLUDED
#include <iostream>
#include <conio.h>
using namespace std;
// Created by Hizas Sabilal Rasyad
typedef int hour;
typedef int minute;
typedef int second;
struct clock
{
hour HH;
minute MM;
second SS;
};
bool IsValid(int HH,int MM,int SS);
clock MakeClock(int HH,int MM,int SS);
hour GetHour(clock c);
minute GetMinute(clock c);
second GetSecond(clock c);
void SetHour(clock *c, int newHH);
void SetMinute(clock *c, int newMM);
void SetSecond(clock *c, int newSS);
clock AddClock(clock c1, clock c2);
bool IsEqual(clock c1,clock c2);
void PrintClock (clock c);
#endif