📄 swap.adb.npp
字号:
with Ada.Text_Io, Ada.Integer_Text_Io;-- Ada.Swap;
use Ada.Text_Io, Ada.Integer_Text_Io;
procedure Main is
Books_Room_1 : Integer;
Books_Room_2 : Integer;
procedure swap (First : in out Integer; Second : in out Integer) is
Temp : Integer;
begin
Temp := First;
First := Second;
Second := Temp;
end swap;
begin
Books_Room_1 := 10; Books_Room_2 := 20;
Put("Books in room 1 ="); Put(Books_Room_1); New_Line;
Put("Books in room 2 ="); Put(Books_Room_2); New_Line;
Put("Swap around"); New_Line;
Swap(Books_Room_1, Books_Room_2);
Put("Books in room 1 ="); Put(Books_Room_1); New_Line;
Put("Books in room 2 ="); Put(Books_Room_2); New_Line;
end Main;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -