Arithmetic expressions


Assignment operator 
We already know that you can set the value of any variable using the input operator.  An input statement is used in cases where a value is specified by the user during program execution.
But, very often we need to set a new value for a variable by calculating it using a certain formula. In this case, the - assignment operator will help us. We have already used it a little in recent problems. Now let's talk about it in more detail.
 
The general form of an assignment operator is as follows: <variable name> = <expression>;

The assignment operator works like this:
1. First, the expression to the right of the assignment sign is evaluated.
2. The resulting value of the expression is stored (say "assigned") in the variable to the left of the assignment sign. In this case, the old value of the variable is erased.

For example, if we need to set the value of the c variable to twice the value of the b variable, then we will need to write it like this: c = 2 * b; Do not forget that in programming you cannot omit multiplication signs in an expression. Otherwise, the computer will not understand what you want to multiply.
For example, you can't just write c = 2b, that would be wrong!

The expression on the right side of the assignment operator allows you to calculate values ​​using various formulas.< br />
What an expression can contain
x integers and real numbers (in real numbers, the integer and fractional parts are separated by a dot, not a comma, as is customary in mathematics);
• arithmetic signs:  
    + addition;
    - subtraction;
    * multiplication;
    / division;
    % modulo.

• standard function calls:
 Math.Abs(x)  - real number module x;
 Math.Sqrt(x)  - square root of a real number x;
 Math.Pow(x,y)  - calculates x to the power of y.

• parentheses to change the order of actions.

Any programming language includes many built-in functions that can be used in arithmetic expressions.
To use additional functions, you often need to include additional libraries.

For example, the most commonly used standard mathematical functions and their notation in C#.
 Math.Abs(x) -  real module x;
 Math.Sqrt(x) -  square root of a real number x;
 Math.Pow(x,y) - < /code>calculates x to the power of y.

Remember that the function argument is always written in brackets.

Rules for writing arithmetic expressions in a programming language

Suppose we need to evaluate an expression written in mathematical form in the following  way:
Before writing a program that calculates the result for us, we formulate rules recordings of algebraic expressions in a programming language:
1. Expressions contain numbers, other variable names, operation signs, parentheses, function names.< br /> 2. Arithmetic operations and their signs (+, -, *, /, %).
3. The separator between integer and fractional parts is a dot.
4. The  expression is written  one per line (linear notation of expressions), the characters are sequentially lined up one after another, all operation signs are put down; parentheses are used.

Thus, following the rules for writing arithmetic expressions, we must translate this (mathematical notation) fraction into a linear notation, that is, write the fraction in one line.
The numerator and denominator contain complex (that is, they contain two or more factors) expressions, then when writing in a linear form, you need
parenthesize expressions in the numerator and denominator.
Thus, the linear notation of such an expression would look like this:

(2*17.56*17.56)/(7*2.47*0.43)

Let's write a program to calculate this expression: to do this, let's define the input and output data.

input data:  all values ​​are known, so there is no need to enter anything from the keyboard, therefore, there will be no input data.

output data: the program should display the result of the given arithmetic expression (you can enter it into any variable, or immediately display the value on the screen).

We will immediately display the result of the expression on the screen without saving it in any variable.  
The result will be a real number. 
using System;
class Program {
    static void Main(){
        Console.WriteLine((2 * 17.56 * 17.56) / (7 * 2.47 * 0.43));
    }
}
Run the program on your computer and make sure it outputs 82.949843.