Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
void main() {
var c1 = 10;
var c2 = 5;
var c3 = 10;
print("Is c1 Greater Than c2? Ans: ${c1 > c2}\n");
print("Is c1 Greater Than c2? Ans: ${c1 < c2}\n");
print("Is c2 Greater Than c1? Ans: ${c2 > c1}\n");
print("Is c1 equal to c2? Ans: ${c1 == c2}\n");
print("Is c3 equal to c1? Ans: ${c1 == c3}\n");
var one = true; //1
var zero = false; //0
print("AND Logic:");
print('AND zero,zero: ${zero & zero}');
print('AND zero,one: ${zero & one}');
print('AND one,zero: ${one & zero}');
print('AND one,one: ${one & one}');
print("\nOR Logic: ");
print('OR zero,zero: ${zero | zero}');
print('OR zero,one: ${zero | one}');
print('OR one,zero: ${one | zero}');
print('OR one,one: ${one | one}');
print("\nXOR Logic: ");
print('XOR zero,zero: ${zero ^ zero}');
print('XOR zero,one: ${zero ^ one}');
print('XOR one,zero: ${one ^ zero}');
print('XOR one,one: ${one ^ one}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.