Created
April 18, 2015 17:03
-
-
Save davglass/c3a4b972deb8b1cd54f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int num = 1; | |
char str = "Hello World"; | |
float dec = 1024.45; | |
double bigint = 99999999; | |
int array[] = { 5, 10, 15, 20, 25, 30, 35, 40 }; | |
if (num == 1) { | |
} | |
if (num != 1) { | |
} | |
if (num > 0) { | |
} | |
if (num < 2) { | |
} | |
if (num >= 1) { | |
} | |
if (num <= 1) { | |
} | |
if (num > 0 && num < 10) { | |
} | |
if (num > 0 || num < 10) { | |
} | |
if (!(num > 0 && num < 10)) { | |
} | |
if (num % 2) { | |
} | |
int foo = num + num; | |
int foo = num - num; | |
int foo = num * num; | |
int foo = num / num; | |
num++; | |
num--; | |
num += 10; | |
num -= 10; | |
num *= 10; | |
num /= 2; | |
//Looping | |
for (int i = 0; i < 10; i++) { | |
//i == ? | |
} | |
do { | |
num++; | |
} while (num < 10); | |
while (num < 10) { | |
num++; | |
}; | |
//Array looping | |
int array[] = { 5, 10, 15, 20, 25, 30, 35, 40 }; | |
int len = sizeof(array) / sizeof(array[0]); | |
for (int i = 0; i < len; i++) { | |
array[i]; | |
} | |
void setup() { | |
} | |
void loop() { | |
} | |
/* | |
In computing, the modulo operation finds the remainder after division of one number by another (sometimes called modulus). | |
Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of | |
the Euclidean division of a by n. For instance, the expression "5 mod 2" would evaluate to 1 because 5 divided by 2 leaves | |
a quotient of 2 and a remainder of 1, while "9 mod 3" would evaluate to 0 because the division of 9 by 3 has a quotient of | |
3 and leaves a remainder of 0; there is nothing to subtract from 9 after multiplying 3 times 3. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment