ARDX-experimenters-g.. - Oomlout
ARDX-experimenters-g.. - Oomlout
ARDX-experimenters-g.. - Oomlout
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
.:For a full programming reference visit:.http://tinyurl.com/882oxm03 PROGprogrammingprimerMaths OperatorsOperators used formanipulating numbers.(they work like simplemaths)= (assignment) makes something equal to something else (eg. x =10 * 2 (x now equals 20))% (modulo) gives the remainder when one number is divided byanother (ex. 12 % 10 (gives 2))+ (addition)- (subtraction)* (multiplication)/ (division)Comparison OperatorsOperators used for logicalcomparison== (equal to) (eg. 12 == 10 is FALSE or 12 == 12 is TRUE)!= (not equal to) (eg. 12 != 10 is TRUE or 12 != 12 is FALSE)< (less than) (eg. 12 < 10 is FALSE or 12 < 12 is FALSE or 12 < 14 is TRUE)> (greater than) (eg. 12 > 10 is TRUE or 12 > 12 is FALSE or 12 > 14 isFALSE)Control StructurePrograms are reliant oncontrolling what runsnext, here are the basiccontrol elements (thereare many more online)if(condition){ }else if( condition ){ }else { }This will execute the code betweenthe curly brackets if the condition istrue, and if not it will test the elseif condition if that is also false theelse code will execute.for(int i = 0; i