...
This commit is contained in:
parent
051504d65b
commit
0457928c3e
295 changed files with 3588 additions and 3 deletions
29
Task/Arithmetic-Integer/Eiffel/arithmetic-integer.e
Normal file
29
Task/Arithmetic-Integer/Eiffel/arithmetic-integer.e
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
class MAIN
|
||||
creation make
|
||||
feature make is
|
||||
local
|
||||
a, b: REAL;
|
||||
do
|
||||
print("a = ");
|
||||
io.read_real;
|
||||
a := io.last_real;
|
||||
|
||||
print("b = ");
|
||||
io.read_real;
|
||||
b := io.last_real;
|
||||
|
||||
print("a + b = ");
|
||||
io.put_real(a + b);
|
||||
print("%Na - b = ");
|
||||
io.put_real(a - b);
|
||||
print("%Na * b = ");
|
||||
io.put_real(a * b);
|
||||
print("%Na / b = ");
|
||||
io.put_real(a / b);
|
||||
print("%Na %% b = ");
|
||||
io.put_real(((a / b) - (a / b).floor) * b);
|
||||
print("%Na ^ b = ");
|
||||
io.put_real(a.pow(b));
|
||||
print("%N");
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue