Module: VARIABLES. OUTPUT FORMATS


Problem

2/6

Almost Calculator

Theory Click to read/hide

Display
Let's try to write a calculator for prime numbers. Our task is to display some arithmetic expression on the screen and make the computer calculate it.
For example: 
5+7=12
Moreover, instead of 5 and 7, there can be different numbers, depending on the values ​​of the variables a and b in the program.
In the output statement, you can display not only text, but also the values ​​of variables, as well as the result of an arithmetic expression. Moreover, the output sequence may be different. For example, in order to display the above expression, you need to write this: writeln(a, '+', b, '=', a + b); If we want to display the value of a variable, then we just need to specify its name without quotes. If we want to display the result of an arithmetic expression, then it is enough just to write the arithmetic expression correctly.

Special attention should be given to the operation of division of integer numeric data types. In Pascal, two division operations are allowed, which are respectively denoted by  '/' and div< /strong>. You need to know that the result of dividing '/' is not an integer, but a real number (this is true even if you divide 8 by 2, i.e. 8/2=4.0). Division div – this integer division, i.e. result type is integer (i.e. 8 div 4 = 4).

Pay attention!
Variables, text and arithmetic expressions are separated from each other by a comma.


Be sure to do the exercises, so you can quickly consolidate the knowledge gained in practice!

Problem

Complete the given program so that, in addition to the sum of numbers, it displays the difference, product, and quotient in the corresponding lines. 
The result of each action must be displayed on a new line. 
Don't forget to break newlines where necessary. 
You should get the following:
10+5=15
10-5=5
10*5=50
10/5=2