mirror of
https://gitlab.com/klmp200/LO27.git
synced 2026-10-23 21:29:31 +00:00
Ajout de OR et AND
This commit is contained in:
1 parent
85872acc6e
commit
b063bc42c0
3 files changed
+33
-1
No files matched your search
@@ -137,3 +137,19 @@ void FreeCellElement(cellElement* element) {
|
|||||||
element = NULL;
|
element = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool OR(bool a, bool b){
|
||||||
|
if (a || b){
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AND(bool a, bool b){
|
||||||
|
if (a && b){
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -144,4 +144,21 @@ int SetNextRow(cellElement* tree,cellElement* elem);
|
|||||||
|
|
||||||
void recursivePrint(cellElement * tree);
|
void recursivePrint(cellElement * tree);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply OR operator to a bool a and a bool b
|
||||||
|
* @param a a bool
|
||||||
|
* @param b a bool
|
||||||
|
* @return result a or b
|
||||||
|
*/
|
||||||
|
bool OR(bool a, bool b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply AND operator to a bool a and a bool b
|
||||||
|
* @param a a bool
|
||||||
|
* @param b a bool
|
||||||
|
* @return result a and b
|
||||||
|
*/
|
||||||
|
bool AND(bool a, bool b);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -311,7 +311,6 @@ Matrix freeMatrix(Matrix matrix){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* todos :
|
/* todos :
|
||||||
*finir le freeMatrix
|
*finir le freeMatrix
|
||||||
*chasser les bugs
|
*chasser les bugs
|
||||||
|
|||||||
Reference in new issue
Block a user