Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
A textbook of Computer Based Numerical and Statiscal Techniques part 58. By joining statistical analysis with computer-based numerical methods, this book bridges the gap between theory and practice with software-based examples, flow charts, and applications. Designed for engineering students as well as practicing engineers and scientists, the book has numerous examples with in-text solutions. | 556 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES char c int i int i1 i2. it is on line. Variable Names Variable names the formal term is identifiers consist of letters numbers and underscores. For our purposes names must begin with a letter. The capitalization of names in C is significant. Arithmetic Operators The basic operators for performing arithmetic are the same in many computer languages addition - subtraction multiplication division modulus remainder The operator can be used in two ways to subtract two numbers as in a - b or to negate one number as in -a b or a -b . When applied to integers the division operator discards any remainder so 1 2 is 0 and 7 4 is 1. But when either operand is a floating-point quantity type float or double the division operator yields a floating-point result with a potentially non-zero fractional part. So 1 2.0 is 0.5 and 7.0 4.0 is 1.75. The modulus operator gives you the remainder when two integers are divided 1 2 is 1 7 4 is 3. The modulus operator can only be applied to integers. An additional arithmetic operation you might be wondering about is exponentiation. Some languages have an exponentiation operator typically A or . Multiplication division and modulus all have higher precedence than addition and subtraction. The term precedence refers to how tightly operators bind to their operands. All of these operators group from left to right which means that when two or more of them have the same precedence and participate next to each other in an expression the evaluation conceptually proceeds from left to right. Assignment Operators The assignment operator assigns a value to a variable. For example x 1 sets x to 1 and a b sets a to whatever b s value is. The expression i i 1 is as we ve mentioned elsewhere the standard programming idiom for increasing a variable s value by 1. Function Calls Any function can be called by mentioning its name followed by a pair of parentheses. If the function takes any arguments you place .