-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestf.le
More file actions
43 lines (41 loc) · 774 Bytes
/
testf.le
File metadata and controls
43 lines (41 loc) · 774 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
40
41
42
43
begin
write('Recommended input:'); writeln;
write('2.0'); writeln;
write('16.0'); writeln;
write('0.0'); writeln; writeln;
write('exponential calculator.');
writeln;
write('(enter base = 0 to exit)');
writeln;
base := -1.0;
repeat
begin
writeln;
write('please enter the base: ');
read(base);
if base != 0.0
begin
write('please enter the exponent: ');
read(exponent);
num := 1.0;
count := exponent;
repeat
begin
num := num * base;
write(count);
writeln;
count := count - 1.0;
end
until count <= 0.0;
writeln;
write('the base ');
write(base);
write(' raised to the power of ');
write(exponent);
write(' is ');
write(num);
writeln;
end;
end
until base = 0.0;
end