-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile_pascal.pas
More file actions
39 lines (38 loc) · 797 Bytes
/
while_pascal.pas
File metadata and controls
39 lines (38 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
program progman;
var vklad, urok,cil : real;
var i:longint;
begin
writeln('zadej cilovou castku');
readln(cil);
writeln('zadej vkladni castku');
readln(vklad);
writeln('zadej urok');
readln(urok);
writeln('je potreba ');
i := 1;
while vklad < cil do
begin
i := i +1;
vklad := vklad * (1 + urok/100);
writeln();
write(i-1);
write('. rok budeme mit ');
write(vklad)
end;
writeln();
write('za ');
write(i-1);
write(' let budeme mit nasporeno');
writeln();
writeln('***************');
vklad:=0;
i:=0;
repeat
writeln('napis hodnotu');
readln(i);
vklad := vklad + i;
until vklad > 100;
writeln();
write('sum is:');
write(vklad);
end.