Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
13
Task/Conditional-structures/Ada/conditional-structures-2.adb
Normal file
13
Task/Conditional-structures/Ada/conditional-structures-2.adb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
type Operation is (Add, Subtract, Multiply, Divide);
|
||||
Op : Operation;
|
||||
Result : Integer;
|
||||
-- we assume that A and B are inputs.
|
||||
Result := (if Op = Add then
|
||||
A + B
|
||||
elsif Op = Subtract then
|
||||
A - B
|
||||
elsif Op = Multiply then
|
||||
A * B
|
||||
elsif Op = Divide then
|
||||
A / B
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue