Sign in Join
Wiki copytemporary

Basic Pascal Tutorial/Chapter 1/Solution/ru: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-<font size="5">Решение</font>
1+Решение
22
331Ha - Solution (author: Tao Yue, state: unchanged)
44
55Это один из способов решения задачи по программированию в предыдущем разделе.
66
77``` pascal
88(* Author: Tao Yue
99 Date: 19 June 1997
1010 Description:
1111 Find the sum and average of five predefined numbers
1212 Version:
1313 1.0 - original version
1414*)
1515
1616program SumAverage;
1717
1818const
1919 NumberOfIntegers = 5;
2020
2121var
2222 A, B, C, D, E : integer;
2323 Sum : integer;
2424 Average : real;
2525
2626begin (* Main *)
2727 A := 45;
2828 B := 7;
2929 C := 68;
3030 D := 2;
3131 E := 34;
3232 Sum := A + B + C + D + E;
3333 Average := Sum / NumberOfIntegers;
3434 writeln ('Number of integers = ', NumberOfIntegers);
3535 writeln ('Number1 = ', A);
3636 writeln ('Number2 = ', B);
3737 writeln ('Number3 = ', C);
3838 writeln ('Number4 = ', D);
3939 writeln ('Number5 = ', E);
4040 writeln ('Sum = ', Sum);
4141 writeln ('Average = ', Average)
4242end. (* Main *)
4343```
4444
4545---
4646*From the Free Pascal wiki, page "Basic Pascal Tutorial/Chapter 1/Solution/ru", as it stood on 2022-08-20 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history