The variables in the shell are stored as strings, even if you assign values to the value of the shape unless you declare the variable by declare-i.
In the case of numerical/arithmetic operations, you may find the following
$ x=121$ echo $x
I. OverviewArithmetic Operators are operators that can implement mathematical operations such as addition, subtraction, multiplication, and division in a program. The common mathematical operators in shell are as follows.+: Add two variables.-:
The content of this section is a bit dull, but very simple, remember, just like in elementary school we just learned subtraction mixed operation. Remember the priority of the operation. (Of course, if you have a C language or other basis, you can
Bit arithmetic is a kind of old thing passed down from the assembly language generation, only a few 6 operators. At first glance, you will say that it is useless, then you are only half: standing in the current high-level programming point of view,
This article mainly describes the Python arithmetic operator examples of the relevant information, the need for friends can refer to the following
Python arithmetic operators
The following assumes that the variable A is 10 and the variable B is 20:
1, quotient, remainder, modulo and sqrtThe function is quotient used to calculate the quotient (quotient).Functions remainder and is modulo used to find the remainder (remainder).sqrtThe function is used to find the square root of the parameter
Examples of C-language storage operators and other examples, program language OperatorsC Storage Class
The storage class defines the range (visibility) and lifecycle of variables/functions in the C program. These specifiers are placed before their
Now, the reader must be eager to write programs to allow actual interaction between the computer and the outside world. We do not want the program to only work as a typist and display fixed information contained in the program code. Indeed, the
1. Integer PromotionIn an expression, any place where an int or unsigned int type can be used to do the right value can also use a signed or non - the char, short, and Bit-field symbols. If the value range of the original type can be represented by
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.