Difference between revisions of "Basic Pascal Tutorial/Chapter 2/Solution/de"
From Lazarus wiki
Jump to navigationJump to search (Created page with "{{Solution 2}} {{TYNavigator|Programming_Assignment_2|Sequential_control}} == 2Fa - Lösung == ''(Autor: Tao Yue, Übersetzung ins Deutsche)'' <syntaxhighlight> (* Author:...") |
m (bypass language bar/categorization template redirect [cf. discussion]) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Solution | + | {{Basic Pascal Tutorial/Chapter 2/Solution}} |
− | {{TYNavigator| | + | {{TYNavigator|Chapter 2/Programming Assignment|Chapter 3/Sequential control}} |
== 2Fa - Lösung == | == 2Fa - Lösung == | ||
Line 7: | Line 7: | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
(* Author: Tao Yue | (* Author: Tao Yue | ||
Date: 19 June 1997 | Date: 19 June 1997 | ||
Line 53: | Line 53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | {{TYNavigator| | + | {{TYNavigator|Chapter 2/Programming Assignment|Chapter 3/Sequential control}} |
Latest revision as of 16:18, 20 August 2022
│
български (bg) │
Deutsch (de) │
English (en) │
français (fr) │
日本語 (ja) │
中文(中国大陆) (zh_CN) │
2Fa - Lösung
(Autor: Tao Yue, Übersetzung ins Deutsche)
(* Author: Tao Yue
Date: 19 June 1997
Description:
Ermittlung der Summe und des Durchschnitts von fünf vordefinierten Zahlen
Version:
1.0 - original version
2.0 - Daten von der Tastatur einlesen
*)
program SumAverage;
const
NumberOfIntegers = 5;
var
A, B, C, D, E : integer;
Sum : integer;
Average : real;
begin (* Main *)
write ('Gib die erste Zahl ein: ');
readln (A);
write ('Gib die zweite Zahl ein: ');
readln (B);
write ('Gib die dritte Zahl ein: ');
readln (C);
write ('Gib die vierte Zahl ein: ');
readln (D);
write ('Gib die fünfte Zahl ein: ');
readln (E);
Sum := A + B + C + D + E;
Average := Sum / 5;
writeln ('Anzahl der Ganzzahlen = ', NumberOfIntegers);
writeln;
writeln ('Nummer1:', A:8);
writeln ('Nummer2:', B:8);
writeln ('Nummer3:', C:8);
writeln ('Nummer4:', D:8);
writeln ('Nummer5:', E:8);
writeln ('================');
writeln ('Summe:', Sum:12);
writeln ('Durchschnitte:', Average:10:1);
end.