Http://mathforum.org/library/drmath/view/52343.htmlMod function and negative numbers
Date: 04/28/2000 at 11:17:09From: AnneSubject: Using the mod() function with negative numbersI work in IT - Technical Support. I am trying to sort out a problem for
Mod operator
Divides two values and returns the remaining numbers.
result = number1 Mod number2
Parameters
Result
Any numeric variable.
Number1
An arbitrary numeric expression.
Number2
An arbitrary numeric expression.
Description
Modulus
The basic elements of the Operator programming language, which makes our code more concise and straightforward. However, in order to solve the problem of different types of operands, we have introduced the concept of forced conversion. Let's look at
Problem xhuge mod
Input:Standard Input
Output:Standard output
Time limit:1 second
The operator for exponentiation is different from the addition, subtraction, multiplication or division operators in the sense that the default associativity for
The operator module contains various built-in operators of Python, such as logic, comparison, and calculation. here we will summarize the examples of using operators of the operator module in Python for some common operators: the operator module is
In Python, the operator module operator examples are summarized.
The operator module is a built-in operator function interface in python, which defines some arithmetic and relatively built-in operation functions. The operator module is implemented
Once the table structure in the database is established, the meaning of the data represented in the table is determined. By using the MySQL operator, you can get another data outside the table structure. For example, there is a birth field in the
Arithmetic operatorsSubtraction (+ 、-、 *,/) Don't say it.Find remainder operator%Description: The first operand divided by the second operand, and the remaining value after the result of an integer division is the remainder Note: The result of the
Operator Precedence
When multiple operations are performed in an expression, each part is computed in a predetermined order called operator precedence. Parentheses can change the order of precedence, forcing a portion of the expression to be treated
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.