You do not need to know calculus in order to be able to program. Computer programming consists of very simple mathematical operations, just addition, subtraction, multiplication, decimal rounding, and even long division (4th grade mathematics come in handy).
Counters are extremely useful; you need to know how to start from scratch and count. Just. Most languages ​​have a null value starting at zero, rather than starting at one. Many students forget this. Increment and pre-increment (for example, i++ and ++i ) increase the variable i by 1 after or before using the variable in the instruction.
Logical operators are huge in programming. Smaller and larger than often used to test a specific value and stay within the proper range. You should understand that i < 5 matches 5 > i , but they calculate either true or false . When used like this: if (i < 5) ... , when i = 4 , then this is equivalent to if (true) ...
Similarly, the AND, OR, and NOT operators are important for logical testing. You can know if (i < 5 && i >= 0) ... , which means that if I am less than five AND I am greater than or equal to 0. NOT ( ! ) And OR ( || ) act in a similar way.
Some languages ​​require you to distinguish between integers and decimal numbers (or floating point numbers). Integer math uses rounding in ways that are different for each language. Decimals have different accuracy problems as operations become more complex.
Some advanced methods include the operation of the module ( % ). All that does is take the remainder of the division of the two numbers. This is useful for distinguishing even and odd numbers (for example, rows in a table).
More general information on the basics of computer programming, including control structures and operators: http://computerprogramming.suite101.com/
js1568
source share