Basic Mathematical Functions With Numbers
This example uses the sign method of the math class to determine the sign of a number.
Basic mathematical functions with numbers. Dim mysign1 as integer math sign 12 dim mysign2 as integer math sign 2 4 dim mysign3 as integer math sign 0 console writeline mysign1 console writeline mysign2 console writeline mysign3 the code produces the following output. Sums of powers of divisors of a given natural number. If there are different degree operations we resolve it by the degree order multiplication and division first and addition and subtraction after. Number of numbers coprime to and not bigger than a given one.
1 1 0. 18 2 4 18 6 12 notice the difference in results even with same numbers. Also we may encounter negative numbers which are quantities that are less than zero. These algebraic formulas of average sum of first n numbers sum of first n odd even numbers sum of square cube numbers series lcm gcd percentage fraction simplification fraction addition subtraction division multiplication fraction to decimal.
Number of primes less than or equal to a given number. 2 3 4 2 12 14.