I just want to flip a boolean based on what it already is. If it\'s true - make it false. If it\'s false - make it true.
Here is my code excerpt:
swi
For integers with values of 0 and 1 you can try:
value = abs(value - 1);
MWE in C:
#include #include int main() { printf("Hello, World!\n"); int value = 0; int i; for (i=0; i<10; i++) { value = abs(value -1); printf("%d\n", value); } return 0; }